Commit 1e94cb52 authored by obscuren's avatar obscuren

Nonce handling

parent 5da03f2e
...@@ -45,7 +45,9 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin ...@@ -45,7 +45,9 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin
} else { } else {
tx = ethchain.NewTransactionMessage(hash, value, gasPrice, gas, []string{}) tx = ethchain.NewTransactionMessage(hash, value, gasPrice, gas, []string{})
} }
tx.Nonce = lib.stateManager.GetAddrState(keyPair.Address()).Nonce acc := lib.stateManager.GetAddrState(keyPair.Address())
tx.Nonce = acc.Nonce
//acc.Nonce++
tx.Sign(keyPair.PrivateKey) tx.Sign(keyPair.PrivateKey)
lib.txPool.QueueTransaction(tx) lib.txPool.QueueTransaction(tx)
......
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