all: use rlp.DecodeBytes instead of rlp.Decode where possible (#27994)

This commit is contained in:
Felix Lange
2023-08-24 11:47:42 +03:00
committed by GitHub
parent 60ec41ce73
commit 9b46986edc
9 changed files with 13 additions and 17 deletions
+2 -2
View File
@@ -282,7 +282,7 @@ func TestSignTx(t *testing.T) {
t.Fatal(err)
}
parsedTx := &types.Transaction{}
rlp.Decode(bytes.NewReader(res.Raw), parsedTx)
rlp.DecodeBytes(res.Raw, parsedTx)
//The tx should NOT be modified by the UI
if parsedTx.Value().Cmp(tx.Value.ToInt()) != 0 {
@@ -308,7 +308,7 @@ func TestSignTx(t *testing.T) {
t.Fatal(err)
}
parsedTx2 := &types.Transaction{}
rlp.Decode(bytes.NewReader(res.Raw), parsedTx2)
rlp.DecodeBytes(res.Raw, parsedTx2)
//The tx should be modified by the UI
if parsedTx2.Value().Cmp(tx.Value.ToInt()) != 0 {