Skip to content

Commit

Permalink
oops add new tx to mempool
Browse files Browse the repository at this point in the history
  • Loading branch information
marcopeereboom committed Jul 15, 2024
1 parent 35bfe53 commit 3a3125b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion service/tbc/tbcfork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ func (b *btcNode) mine(name string, from *chainhash.Hash, payToAddress btcutil.A
// extra nonce is needed to prevent block collisions
en := random(8)
extraNonce := binary.BigEndian.Uint64(en)
var mempool []*btcutil.Tx

nextBlockHeight := parent.Height() + 1
switch nextBlockHeight {
Expand Down Expand Up @@ -504,10 +505,11 @@ func (b *btcNode) mine(name string, from *chainhash.Hash, payToAddress btcutil.A
if err != nil {
panic(err)
}
mempool = []*btcutil.Tx{btcutil.NewTx(tx)}
}

bt, err := newBlockTemplate(b.params, payToAddress, nextBlockHeight,
parent.Hash(), extraNonce, nil)
parent.Hash(), extraNonce, mempool)
if err != nil {
return nil, fmt.Errorf("height %v: %w", nextBlockHeight, err)
}
Expand Down

0 comments on commit 3a3125b

Please sign in to comment.