Merge pull request #833 from ethersphere/frontier/solidity

solidity compiler and contract metadocs integration
This commit is contained in:
Jeffrey Wilcke
2015-05-08 03:43:31 -07:00
21 changed files with 1463 additions and 517 deletions

View File

@@ -66,7 +66,6 @@ func CalcGasLimit(parent *types.Block) *big.Int {
result := new(big.Int).Add(previous, curInt)
result.Div(result, big.NewInt(1024))
return common.BigMax(params.GenesisGasLimit, result)
}
@@ -161,7 +160,8 @@ func (self *ChainManager) Td() *big.Int {
}
func (self *ChainManager) GasLimit() *big.Int {
return self.currentGasLimit
// return self.currentGasLimit
return self.currentBlock.GasLimit()
}
func (self *ChainManager) LastBlockHash() common.Hash {
@@ -280,7 +280,6 @@ func (bc *ChainManager) NewBlock(coinbase common.Address) *types.Block {
header.Difficulty = CalcDifficulty(block.Header(), parent.Header())
header.Number = new(big.Int).Add(parent.Header().Number, common.Big1)
header.GasLimit = CalcGasLimit(parent)
}
return block

View File

@@ -138,9 +138,12 @@ func (c *StateObject) setAddr(addr []byte, value interface{}) {
}
func (self *StateObject) GetStorage(key *big.Int) *common.Value {
fmt.Printf("%v: get %v %v", self.address.Hex(), key)
return self.GetState(common.BytesToHash(key.Bytes()))
}
func (self *StateObject) SetStorage(key *big.Int, value *common.Value) {
fmt.Printf("%v: set %v -> %v", self.address.Hex(), key, value)
self.SetState(common.BytesToHash(key.Bytes()), value)
}