mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-01-19 05:43:51 +01:00
Fix onBlockReceived
unit test (#5166)
* Fix onBlockReceived unit test * scalafmt
This commit is contained in:
parent
ef2c96cc99
commit
c2902c1146
@ -88,10 +88,10 @@ class DataMessageHandlerTest extends NodeTestWithCachedBitcoindNewest {
|
||||
}
|
||||
}
|
||||
|
||||
val nodeCallbacks = NodeCallbacks.onBlockReceived(callback)
|
||||
node.nodeAppConfig.addCallbacks(nodeCallbacks)
|
||||
|
||||
for {
|
||||
_ <- NodeTestUtil.awaitAllSync(node, bitcoind)
|
||||
nodeCallbacks = NodeCallbacks.onBlockReceived(callback)
|
||||
_ = node.nodeAppConfig.addCallbacks(nodeCallbacks)
|
||||
hash <- bitcoind.generateToAddress(blocks = 1, junkAddress).map(_.head)
|
||||
result = Await.result(resultP.future, 30.seconds)
|
||||
} yield assert(result.blockHeader.hashBE == hash)
|
||||
|
Loading…
Reference in New Issue
Block a user