diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_makers.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/chain_makers.go b/core/chain_makers.go index 4f6fa3989..5a8f380a3 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -104,6 +104,11 @@ func (b *BlockGen) AddTx(tx *types.Transaction) { b.receipts = append(b.receipts, receipt) } +// Number returns the block number of the block being generated. +func (b *BlockGen) Number() *big.Int { + return new(big.Int).Set(b.header.Number) +} + // AddUncheckedReceipts forcefully adds a receipts to the block without a // backing transaction. // |