File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/main/java/org/tron/core/net/message Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public BlockMessage(Block block) {
2222 this .data = block .toByteArray ();
2323 }
2424
25- public BlockMessage (BlockCapsule block ) throws Exception {
25+ public BlockMessage (BlockCapsule block ) {
2626 data = block .getData ();
2727 this .type = MessageTypes .BLOCK .asByte ();
2828 this .block = block .getInstance ();
Original file line number Diff line number Diff line change 11package org .tron .core .net .message ;
22
3+ import org .tron .common .utils .Sha256Hash ;
34import org .tron .core .capsule .TransactionCapsule ;
45import org .tron .protos .Protocol ;
56import org .tron .protos .Protocol .Transaction ;
@@ -20,6 +21,11 @@ public TransactionMessage(Transaction trx) {
2021 this .data = trx .toByteArray ();
2122 }
2223
24+ @ Override
25+ public Sha256Hash getMessageId () {
26+ return getTransactionCapsule ().getTransactionId ();
27+ }
28+
2329 @ Override
2430 public String toString () {
2531 return new StringBuilder ().append (super .toString ())
You can’t perform that action at this time.
0 commit comments