From 5c82fdc2434c302a2b65a4c7f25fe91b22cd43df Mon Sep 17 00:00:00 2001
From: obscuren <geffobscura@gmail.com>
Date: Fri, 2 Jan 2015 22:18:23 +0100
Subject: [PATCH] Make sure that the object exists

---
 xeth/pipe.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xeth/pipe.go b/xeth/pipe.go
index 775d5cfc5..cae6ee1de 100644
--- a/xeth/pipe.go
+++ b/xeth/pipe.go
@@ -139,7 +139,7 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et
 
 	// Do some pre processing for our "pre" events  and hooks
 	block := self.chainManager.NewBlock(key.Address())
-	coinbase := state.GetStateObject(key.Address())
+	coinbase := state.GetOrNewStateObject(key.Address())
 	coinbase.SetGasPool(block.GasLimit())
 	self.blockManager.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true)
 
-- 
GitLab