Commit ad51c85e authored by obscuren's avatar obscuren

Fixed crash

parent 4b13f93a
...@@ -99,6 +99,9 @@ func CreateBlock(root interface{}, ...@@ -99,6 +99,9 @@ func CreateBlock(root interface{},
Time: time.Now().Unix(), Time: time.Now().Unix(),
Extra: extra, Extra: extra,
UncleSha: EmptyShaList, UncleSha: EmptyShaList,
GasUsed: new(big.Int),
MinGasPrice: new(big.Int),
GasLimit: new(big.Int),
contractStates: make(map[string]*ethutil.Trie), contractStates: make(map[string]*ethutil.Trie),
} }
block.SetTransactions(txes) block.SetTransactions(txes)
...@@ -220,7 +223,7 @@ func (block *Block) SetTransactions(txs []*Transaction) { ...@@ -220,7 +223,7 @@ func (block *Block) SetTransactions(txs []*Transaction) {
trie.Update(strconv.Itoa(i), string(tx.RlpEncode())) trie.Update(strconv.Itoa(i), string(tx.RlpEncode()))
} }
block.TxSha = trie.Root.([]byte) block.TxSha = []byte(trie.Root.(string))
} }
func (block *Block) Value() *ethutil.Value { func (block *Block) Value() *ethutil.Value {
......
...@@ -18,7 +18,7 @@ const ( ...@@ -18,7 +18,7 @@ const (
// The size of the output buffer for writing messages // The size of the output buffer for writing messages
outputBufferSize = 50 outputBufferSize = 50
// Current protocol version // Current protocol version
ProtocolVersion = 10 ProtocolVersion = 11
) )
type DiscReason byte type DiscReason byte
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment