Fix bug in hash calculation Tx
This commit is contained in:
parent
23250da8eb
commit
a41b0c9a21
|
@ -96,8 +96,6 @@ public class Transaction {
|
|||
RLPList decodedTxList = RLP.decode2(rlpEncodedSigned);
|
||||
RLPList transaction = (RLPList) decodedTxList.get(0);
|
||||
|
||||
this.hash = HashUtil.sha3(rlpEncodedSigned);
|
||||
|
||||
this.nonce = ((RLPItem) transaction.get(0)).getRLPData();
|
||||
this.gasPrice = ((RLPItem) transaction.get(1)).getRLPData();
|
||||
this.gasLimit = ((RLPItem) transaction.get(2)).getRLPData();
|
||||
|
@ -118,6 +116,7 @@ public class Transaction {
|
|||
this.signature = ECDSASignature.fromComponents(r, s, v);
|
||||
} else throw new RuntimeException("Wrong tx data element list size");
|
||||
this.parsed = true;
|
||||
this.hash = this.getHash();
|
||||
}
|
||||
|
||||
public boolean isParsed() {
|
||||
|
|
Loading…
Reference in New Issue