Commit b8034f4d authored by obscuren's avatar obscuren

Increment nonce in the public api

parent bd48690f
...@@ -95,7 +95,6 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro ...@@ -95,7 +95,6 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
if ethutil.Config.Debug { if ethutil.Config.Debug {
ethutil.Config.Log.Debugf("# op\n") ethutil.Config.Log.Debugf("# op\n")
} }
fmt.Println(closure.Script)
for { for {
// The base for all big integer arithmetic // The base for all big integer arithmetic
......
...@@ -162,6 +162,7 @@ func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, in ...@@ -162,6 +162,7 @@ func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, in
acc := lib.stateManager.TransState().GetStateObject(keyPair.Address()) acc := lib.stateManager.TransState().GetStateObject(keyPair.Address())
//acc := lib.stateManager.GetAddrState(keyPair.Address()) //acc := lib.stateManager.GetAddrState(keyPair.Address())
tx.Nonce = acc.Nonce tx.Nonce = acc.Nonce
acc.Nonce += 1
lib.stateManager.TransState().SetStateObject(acc) lib.stateManager.TransState().SetStateObject(acc)
tx.Sign(keyPair.PrivateKey) tx.Sign(keyPair.PrivateKey)
......
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