From b100d0f3ede2c2e6d2735e9b9eecc8f77ef035de Mon Sep 17 00:00:00 2001 From: Nate Maninger Date: Mon, 22 Apr 2024 16:51:48 -0700 Subject: [PATCH] wallet: improve revert docstring --- wallet/update.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wallet/update.go b/wallet/update.go index 16cf999..387bd4e 100644 --- a/wallet/update.go +++ b/wallet/update.go @@ -24,8 +24,14 @@ type ( // removed. ApplyIndex(index types.ChainIndex, created, spent []types.SiacoinElement, events []Event) error // RevertIndex is called with the chain index that is being reverted. - // Any transactions and siacoin elements that were created by the index - // should be removed. + // Any transactions that were added by the index should be removed + // + // removed contains the siacoin elements that were created by the index + // and should be deleted. + // + // unspent contains the siacoin elements that were spent and should be + // recreated. They are not necessarily created by the index and should + // not be associated with it. RevertIndex(index types.ChainIndex, removed, unspent []types.SiacoinElement) error } )