sweep: delete pending inputs based on their states
This commit uniforms and put the deletion of pending inputs in a single point.
This commit is contained in:
3 files changed
+191
-29
No files matched your search
@@ -99,6 +99,8 @@ func (m *MockNotifier) sendSpend(channel chan *chainntnfs.SpendDetail,
|
||||
outpoint *wire.OutPoint,
|
||||
spendingTx *wire.MsgTx) {
|
||||
|
||||
log.Debugf("Notifying spend of outpoint %v", outpoint)
|
||||
|
||||
spenderTxHash := spendingTx.TxHash()
|
||||
channel <- &chainntnfs.SpendDetail{
|
||||
SpenderTxHash: &spenderTxHash,
|
||||
@@ -188,6 +190,8 @@ func (m *MockNotifier) Stop() error {
|
||||
func (m *MockNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
|
||||
_ []byte, heightHint uint32) (*chainntnfs.SpendEvent, error) {
|
||||
|
||||
log.Debugf("RegisterSpendNtfn for outpoint %v", outpoint)
|
||||
|
||||
// Add channel to global spend ntfn map.
|
||||
m.mutex.Lock()
|
||||
|
||||
|
||||
Reference in new issue
Block a user