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

Method SetBalance

core/state/state_object.go:260–266  ·  view source on GitHub ↗
(amount *big.Int)

Source from the content-addressed store, hash-verified

258}
259
260func (self *stateObject) SetBalance(amount *big.Int) {
261 self.db.journal.append(balanceChange{
262 account: &self.address,
263 prev: new(big.Int).Set(self.data.Balance),
264 })
265 self.setBalance(amount)
266}
267
268func (self *stateObject) setBalance(amount *big.Int) {
269 self.data.Balance = amount

Callers 2

AddBalanceMethod · 0.95
SubBalanceMethod · 0.95

Calls 3

setBalanceMethod · 0.95
appendMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected