diff --git a/cmd/hemictl/hemictl.go b/cmd/hemictl/hemictl.go index a9ce65313..36cfc7772 100644 --- a/cmd/hemictl/hemictl.go +++ b/cmd/hemictl/hemictl.go @@ -479,7 +479,7 @@ func tbcdb() error { return fmt.Errorf("chainhash: %w", err) } - tx, err := s.TxById(ctx, chtxid) + tx, _, err := s.TxById(ctx, chtxid) if err != nil { return fmt.Errorf("block by txid: %w", err) } diff --git a/database/tbcd/level/level.go b/database/tbcd/level/level.go index d2967cb68..f0ef488c0 100644 --- a/database/tbcd/level/level.go +++ b/database/tbcd/level/level.go @@ -10,12 +10,13 @@ import ( "encoding/binary" "errors" "fmt" - "github.com/btcsuite/btcd/wire" "math/big" "net" "sync" "time" + "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" diff --git a/service/tbc/tbc.go b/service/tbc/tbc.go index 9d8cc1506..70f2457c0 100644 --- a/service/tbc/tbc.go +++ b/service/tbc/tbc.go @@ -1709,7 +1709,6 @@ func (s *Server) TxById(ctx context.Context, txId *chainhash.Hash) (*wire.MsgTx, } func feesFromTransactions(txs []*btcutil.Tx) error { - for idx, tx := range txs { for _, txIn := range tx.MsgTx().TxIn { if idx == 0 { diff --git a/service/tbc/tbc_test.go b/service/tbc/tbc_test.go index e76b2db3b..f091e1d6d 100644 --- a/service/tbc/tbc_test.go +++ b/service/tbc/tbc_test.go @@ -11,7 +11,6 @@ import ( "encoding/json" "errors" "fmt" - "github.com/hemilabs/heminetwork/database/tbcd" "io" "net" "os" @@ -21,6 +20,8 @@ import ( "testing" "time" + "github.com/hemilabs/heminetwork/database/tbcd" + "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire"