diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-11-27 22:40:29 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2016-02-18 17:08:11 +0800 |
commit | 371871d685d54b916aef28de689d6f0af7822083 (patch) | |
tree | e704b02ba2ffd2d1164001885fba15106b0f7d94 /core/state/state_object.go | |
parent | aa36a6ae4f24f07e2c470a21c93ff37ad5861982 (diff) | |
download | dexon-371871d685d54b916aef28de689d6f0af7822083.tar.gz dexon-371871d685d54b916aef28de689d6f0af7822083.tar.zst dexon-371871d685d54b916aef28de689d6f0af7822083.zip |
parmas, crypto, core, core/vm: homestead consensus protocol changes
* change gas cost for contract creating txs
* invalidate signature with s value greater than secp256k1 N / 2
* OOG contract creation if not enough gas to store code
* new difficulty adjustment algorithm
* new DELEGATECALL op code
Diffstat (limited to 'core/state/state_object.go')
-rw-r--r-- | core/state/state_object.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/state/state_object.go b/core/state/state_object.go index 47546112f..ebc9f8358 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -211,6 +211,11 @@ func (c *StateObject) Address() common.Address { return c.address } +// Sets the address of the contract/account +func (c *StateObject) SetAddress(addr common.Address) { + c.address = addr +} + func (self *StateObject) Trie() *trie.SecureTrie { return self.trie } @@ -238,6 +243,13 @@ func (self *StateObject) Nonce() uint64 { return self.nonce } +// Never called, but must be present to allow StateObject to be used +// as a vm.Account interface that also satisfies the vm.ContractRef +// interface. Interfaces are awesome. +func (self *StateObject) Value() *big.Int { + return nil +} + func (self *StateObject) EachStorage(cb func(key, value []byte)) { // When iterating over the storage check the cache first for h, v := range self.storage { |