chainntnfs/neutrinonotify: update async conf dispatch to use scripts
This commit is contained in:
parent
f7d9b8e6b0
commit
b1a775b29e
@ -10,6 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||||
"github.com/btcsuite/btcd/rpcclient"
|
"github.com/btcsuite/btcd/rpcclient"
|
||||||
|
"github.com/btcsuite/btcd/txscript"
|
||||||
"github.com/btcsuite/btcd/wire"
|
"github.com/btcsuite/btcd/wire"
|
||||||
"github.com/btcsuite/btcutil"
|
"github.com/btcsuite/btcutil"
|
||||||
"github.com/btcsuite/btcutil/gcs/builder"
|
"github.com/btcsuite/btcutil/gcs/builder"
|
||||||
@ -317,8 +318,19 @@ func (n *NeutrinoNotifier) notificationDispatcher() {
|
|||||||
defer n.wg.Done()
|
defer n.wg.Done()
|
||||||
|
|
||||||
confDetails, err := n.historicalConfDetails(
|
confDetails, err := n.historicalConfDetails(
|
||||||
msg.TxID, currentHeight,
|
msg.TxID, msg.pkScript, currentHeight, msg.heightHint,
|
||||||
msg.heightHint,
|
)
|
||||||
|
if err != nil {
|
||||||
|
chainntnfs.Log.Error(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// We'll map the script into an address
|
||||||
|
// type so we can instruct neutrino to
|
||||||
|
// match if the transaction containing
|
||||||
|
// the script is found in a block.
|
||||||
|
params := n.p2pNode.ChainParams()
|
||||||
|
_, addrs, _, err := txscript.ExtractPkScriptAddrs(
|
||||||
|
msg.pkScript, ¶ms,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
chainntnfs.Log.Error(err)
|
chainntnfs.Log.Error(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user