@@ -609,7 +609,8 @@ func (n *NeutrinoNotifier) historicalConfDetails(confRequest chainntnfs.ConfRequ
609609 key := builder .DeriveKey (blockHash )
610610 match , err := regFilter .Match (key , confRequest .PkScript .Script ())
611611 if err != nil {
612- return nil , fmt .Errorf ("unable to query filter: %v" , err )
612+ return nil , fmt .Errorf ("unable to query filter: %w" ,
613+ err )
613614 }
614615
615616 // If there's no match, then we can continue forward to the
@@ -623,7 +624,8 @@ func (n *NeutrinoNotifier) historicalConfDetails(confRequest chainntnfs.ConfRequ
623624 // to send the proper response.
624625 block , err := n .GetBlock (* blockHash )
625626 if err != nil {
626- return nil , fmt .Errorf ("unable to get block from network: %v" , err )
627+ return nil , fmt .Errorf ("unable to get block from " +
628+ "network: %w" , err )
627629 }
628630
629631 // For every transaction in the block, check which one matches
@@ -663,11 +665,11 @@ func (n *NeutrinoNotifier) handleBlockConnected(newBlock *filteredBlock) error {
663665 // result in the items we care about being dispatched.
664666 rawBlock , err := n .GetBlock (newBlock .hash )
665667 if err != nil {
666- return fmt .Errorf ("unable to get full block: %v " , err )
668+ return fmt .Errorf ("unable to get full block: %w " , err )
667669 }
668670 err = n .txNotifier .ConnectTip (rawBlock , newBlock .height )
669671 if err != nil {
670- return fmt .Errorf ("unable to connect tip: %v " , err )
672+ return fmt .Errorf ("unable to connect tip: %w " , err )
671673 }
672674
673675 chainntnfs .Log .Infof ("New block: height=%v, sha=%v" , newBlock .height ,
@@ -692,7 +694,7 @@ func (n *NeutrinoNotifier) handleBlockConnected(newBlock *filteredBlock) error {
692694func (n * NeutrinoNotifier ) getFilteredBlock (epoch chainntnfs.BlockEpoch ) (* filteredBlock , error ) {
693695 rawBlock , err := n .GetBlock (* epoch .Hash )
694696 if err != nil {
695- return nil , fmt .Errorf ("unable to get block: %v " , err )
697+ return nil , fmt .Errorf ("unable to get block: %w " , err )
696698 }
697699
698700 txns := rawBlock .Transactions ()
@@ -800,7 +802,7 @@ func (n *NeutrinoNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
800802 return nil , chainntnfs .ErrChainNotifierShuttingDown
801803 }
802804 if err != nil {
803- return nil , fmt .Errorf ("unable to update filter: %v " , err )
805+ return nil , fmt .Errorf ("unable to update filter: %w " , err )
804806 }
805807
806808 // If the txNotifier didn't return any details to perform a historical
@@ -937,7 +939,7 @@ func (n *NeutrinoNotifier) RegisterConfirmationsNtfn(txid *chainhash.Hash,
937939 params := n .p2pNode .ChainParams ()
938940 _ , addrs , _ , err := txscript .ExtractPkScriptAddrs (pkScript , & params )
939941 if err != nil {
940- return nil , fmt .Errorf ("unable to extract script: %v " , err )
942+ return nil , fmt .Errorf ("unable to extract script: %w " , err )
941943 }
942944
943945 // We'll send the filter update request to the notifier's main event
@@ -962,7 +964,7 @@ func (n *NeutrinoNotifier) RegisterConfirmationsNtfn(txid *chainhash.Hash,
962964 return nil , chainntnfs .ErrChainNotifierShuttingDown
963965 }
964966 if err != nil {
965- return nil , fmt .Errorf ("unable to update filter: %v " , err )
967+ return nil , fmt .Errorf ("unable to update filter: %w " , err )
966968 }
967969
968970 // If a historical rescan was not requested by the txNotifier, then we
0 commit comments