From f78283a438a89e2c5c0ef00df7559dc9dd633951 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 3 May 2016 20:47:18 -0700 Subject: [PATCH] chainnfts/btcdnotify: update test to upstream API change. rpctest.Harness.CoinbaseSpend now takes a list of outputs rather, than a map from address to output amount. --- chainntfs/btcdnotify/btcdnotify_test.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/chainntfs/btcdnotify/btcdnotify_test.go b/chainntfs/btcdnotify/btcdnotify_test.go index dd45cc0f..c542e1c5 100644 --- a/chainntfs/btcdnotify/btcdnotify_test.go +++ b/chainntfs/btcdnotify/btcdnotify_test.go @@ -30,11 +30,15 @@ var ( ) func getTestTxId(miner *rpctest.Harness) (*wire.ShaHash, error) { - // First, parse the test priv key in order to obtain a key we'll use - // for the confirmation notification test. - outputMap := map[string]btcutil.Amount{testAddr.String(): 2e8} - return miner.CoinbaseSpend(outputMap) + script, err := txscript.PayToAddrScript(testAddr) + if err != nil { + return nil, err + } + + outputs := []*wire.TxOut{&wire.TxOut{2e8, script}} + return miner.CoinbaseSpend(outputs) } + func testSingleConfirmationNotification(miner *rpctest.Harness, notifier chainntnfs.ChainNotifier, t *testing.T) {