mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 15:04:22 +00:00
fixes for chain id in nametx sign functions
This commit is contained in:
+2
-2
@@ -107,7 +107,7 @@ func makeDefaultSendTxSigned(t *testing.T, typ string, addr []byte, amt uint64)
|
||||
|
||||
func makeDefaultCallTx(t *testing.T, typ string, addr, code []byte, amt, gasLim, fee uint64) *types.CallTx {
|
||||
nonce := getNonce(t, typ, user[0].Address)
|
||||
tx := types.NewCallTxWithNonce(user[0].PubKey, addr, code, amt, gasLim, fee, nonce)
|
||||
tx := types.NewCallTxWithNonce(user[0].PubKey, addr, code, amt, gasLim, fee, nonce+1)
|
||||
tx.Sign(chainID, user[0])
|
||||
return tx
|
||||
}
|
||||
@@ -115,7 +115,7 @@ func makeDefaultCallTx(t *testing.T, typ string, addr, code []byte, amt, gasLim,
|
||||
func makeDefaultNameTx(t *testing.T, typ string, name, value string, amt, fee uint64) *types.NameTx {
|
||||
nonce := getNonce(t, typ, user[0].Address)
|
||||
tx := types.NewNameTxWithNonce(user[0].PubKey, name, value, amt, fee, nonce+1)
|
||||
tx.Sign(user[0])
|
||||
tx.Sign(chainID, user[0])
|
||||
return tx
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -238,7 +238,7 @@ func testNameReg(t *testing.T, typ string) {
|
||||
nonce := getNonce(t, typ, user[1].Address)
|
||||
data2 := "this is not my beautiful house"
|
||||
tx = types.NewNameTxWithNonce(user[1].PubKey, name, data2, amt, fee, nonce+1)
|
||||
tx.Sign(user[1])
|
||||
tx.Sign(chainID, user[1])
|
||||
_, err := client.BroadcastTx(tx)
|
||||
if err == nil {
|
||||
t.Fatal("Expected error on NameTx")
|
||||
|
||||
Reference in New Issue
Block a user