MCPcopy Create free account
hub / github.com/CPChain/chain / SetBalance

Method SetBalance

core/state/statedb.go:291–296  ·  view source on GitHub ↗
(addr common.Address, amount *big.Int)

Source from the content-addressed store, hash-verified

289}
290
291func (self *StateDB) SetBalance(addr common.Address, amount *big.Int) {
292 stateObject := self.GetOrNewStateObject(addr)
293 if stateObject != nil {
294 stateObject.SetBalance(amount)
295 }
296}
297
298func (self *StateDB) SetNonce(addr common.Address, nonce uint64) {
299 stateObject := self.GetOrNewStateObject(addr)

Callers 9

StateMethod · 0.45
TestDumpMethod · 0.45
TestSnapshot2Function · 0.45
TestIntermediateLeaksFunction · 0.45
newTestActionFunction · 0.45
TestCopyOfCopyFunction · 0.45
callContractMethod · 0.45
MakePreStateFunction · 0.45

Calls 1

GetOrNewStateObjectMethod · 0.95

Tested by 7

StateMethod · 0.36
TestDumpMethod · 0.36
TestSnapshot2Function · 0.36
TestIntermediateLeaksFunction · 0.36
newTestActionFunction · 0.36
TestCopyOfCopyFunction · 0.36