Skip to content

Commit

Permalink
core: add BlockGen.GetBalance method (ethereum#22589)
Browse files Browse the repository at this point in the history
  • Loading branch information
renaynay committed Mar 29, 2021
1 parent 76700ac commit b6912c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/chain_makers.go
Expand Up @@ -111,6 +111,11 @@ func (b *BlockGen) AddTxWithChain(bc *BlockChain, tx *types.Transaction) {
b.receipts = append(b.receipts, receipt)
}

// GetBalance returns the balance of the given address at the generated block.
func (b *BlockGen) GetBalance(addr common.Address) *big.Int {
return b.statedb.GetBalance(addr)
}

// AddUncheckedTx forcefully adds a transaction to the block without any
// validation.
//
Expand Down

0 comments on commit b6912c1

Please sign in to comment.