aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-01 18:16:14 +0800
committerobscuren <geffobscura@gmail.com>2014-07-01 18:16:14 +0800
commit0ce9003ba77c0552c9058caa55d2fea6711ac18c (patch)
treee8b5c94b8c4fb9f0252ff514b3d6fe4bda1f0283
parent2bbc204328cf674e8ccd591bb4d08179225b396a (diff)
downloaddexon-0ce9003ba77c0552c9058caa55d2fea6711ac18c.tar
dexon-0ce9003ba77c0552c9058caa55d2fea6711ac18c.tar.gz
dexon-0ce9003ba77c0552c9058caa55d2fea6711ac18c.tar.bz2
dexon-0ce9003ba77c0552c9058caa55d2fea6711ac18c.tar.lz
dexon-0ce9003ba77c0552c9058caa55d2fea6711ac18c.tar.xz
dexon-0ce9003ba77c0552c9058caa55d2fea6711ac18c.tar.zst
dexon-0ce9003ba77c0552c9058caa55d2fea6711ac18c.zip
Fix for creating a tx from an unknown account
-rw-r--r--ethpub/pub.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethpub/pub.go b/ethpub/pub.go
index 1bc9e0ce7..250ba71f3 100644
--- a/ethpub/pub.go
+++ b/ethpub/pub.go
@@ -216,7 +216,7 @@ func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, sc
tx = ethchain.NewTransactionMessage(hash, value, gas, gasPrice, data)
}
- acc := lib.stateManager.TransState().GetStateObject(keyPair.Address())
+ acc := lib.stateManager.TransState().GetOrNewStateObject(keyPair.Address())
tx.Nonce = acc.Nonce
acc.Nonce += 1
lib.stateManager.TransState().UpdateStateObject(acc)