mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
signer/core: fix TestSignTx to decode res2
This commit is contained in:
parent
0977a02ec1
commit
c732336923
1 changed files with 3 additions and 3 deletions
|
|
@ -310,11 +310,11 @@ func TestSignTx(t *testing.T) {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
parsedTx2 := &types.Transaction{}
|
parsedTx2 := &types.Transaction{}
|
||||||
rlp.DecodeBytes(res.Raw, parsedTx2)
|
rlp.DecodeBytes(res2.Raw, parsedTx2)
|
||||||
|
|
||||||
//The tx should be modified by the UI
|
//The tx should be modified by the UI
|
||||||
if parsedTx2.Value().Cmp(tx.Value.ToInt()) != 0 {
|
if parsedTx2.Value().Cmp(tx.Value.ToInt()) == 0 {
|
||||||
t.Errorf("Expected value to be unchanged, got %v", parsedTx.Value())
|
t.Errorf("Expected value to be changed, got %v", parsedTx2.Value())
|
||||||
}
|
}
|
||||||
if bytes.Equal(res.Raw, res2.Raw) {
|
if bytes.Equal(res.Raw, res2.Raw) {
|
||||||
t.Error("Expected tx to be modified by UI")
|
t.Error("Expected tx to be modified by UI")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue