sweep: refactor IsOurTx to not return an error
Before this commit, the only error returned from `IsOurTx` is when the root bucket was not created. In that case, we should consider the tx to be not found in our db, since technically our db is empty. A future PR may consider treating our wallet as the single source of truth and query the wallet instead to check for past sweeping txns.
This commit is contained in:
5 files changed
+22
-47
No files matched your search
+2
-2
@@ -24,10 +24,10 @@ func NewMockSweeperStore() *MockSweeperStore {
|
||||
}
|
||||
|
||||
// IsOurTx determines whether a tx is published by us, based on its hash.
|
||||
func (s *MockSweeperStore) IsOurTx(hash chainhash.Hash) (bool, error) {
|
||||
func (s *MockSweeperStore) IsOurTx(hash chainhash.Hash) bool {
|
||||
args := s.Called(hash)
|
||||
|
||||
return args.Bool(0), args.Error(1)
|
||||
return args.Bool(0)
|
||||
}
|
||||
|
||||
// StoreTx stores a tx we are about to publish.
|
||||
|
||||
Reference in new issue
Block a user