sweep: use chain notifier instead of chain IO for best block

Because the BestBlock method of ChainIO is not exposed through any
RPC we want to get rid of it so we can use the sweeper outside of
lnd too. Since the chain notifier now also delivers the current best
block we don't need the BestBlock method any more.
This commit is contained in:
Oliver Gugger
2019-10-07 13:21:25 +02:00
parent b6dda143d0
commit 8e4a897a60
4 changed files with 38 additions and 58 deletions

View File

@ -130,9 +130,8 @@ func createSweeperTestContext(t *testing.T) *sweeperTestContext {
ctx.timeoutChan <- c
return c
},
Store: store,
Signer: &mockSigner{},
ChainIO: &mockChainIO{},
Store: store,
Signer: &mockSigner{},
GenSweepScript: func() ([]byte, error) {
script := []byte{outputScriptCount}
outputScriptCount++