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 authored and atif-konasl committed Oct 15, 2021
1 parent 91520f7 commit c6d3be1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/chain_makers.go
Original file line number Diff line number Diff line change
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 c6d3be1

Please sign in to comment.