소스 검색

Fix for creating a tx from an unknown account

obscuren 11 년 전
부모
커밋
0ce9003ba7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      ethpub/pub.go

+ 1 - 1
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)