@@ -2,6 +2,7 @@ package types
2
2
3
3
import (
4
4
"bytes"
5
+ "encoding/hex"
5
6
"errors"
6
7
"fmt"
7
8
"strings"
@@ -474,7 +475,9 @@ func (h *Header) Hash() cmtbytes.HexBytes {
474
475
if err != nil {
475
476
return nil
476
477
}
477
- return merkle .HashFromByteSlices ([][]byte {
478
+ fmt .Printf ("h.ImplicitHash: %X\n " , hex .EncodeToString (h .ImplicitHash ))
479
+
480
+ merkleHash1 := merkle .HashFromByteSlices ([][]byte {
478
481
hbz ,
479
482
cdcEncode (h .ChainID ),
480
483
cdcEncode (h .Height ),
@@ -491,6 +494,25 @@ func (h *Header) Hash() cmtbytes.HexBytes {
491
494
cdcEncode (h .ProposerAddress ),
492
495
cdcEncode (h .ImplicitHash ),
493
496
})
497
+ merkleHash2 := merkle .HashFromByteSlices ([][]byte {
498
+ hbz ,
499
+ cdcEncode (h .ChainID ),
500
+ cdcEncode (h .Height ),
501
+ pbt ,
502
+ bzbi ,
503
+ cdcEncode (h .LastCommitHash ),
504
+ cdcEncode (h .DataHash ),
505
+ cdcEncode (h .ValidatorsHash ),
506
+ cdcEncode (h .NextValidatorsHash ),
507
+ cdcEncode (h .ConsensusHash ),
508
+ cdcEncode (h .AppHash ),
509
+ cdcEncode (h .LastResultsHash ),
510
+ cdcEncode (h .EvidenceHash ),
511
+ cdcEncode (h .ProposerAddress ),
512
+ })
513
+ fmt .Printf ("merkleHash1: %X\n " , hex .EncodeToString (merkleHash1 ))
514
+ fmt .Printf ("merkleHash2: %X\n " , hex .EncodeToString (merkleHash2 ))
515
+ return merkleHash1
494
516
}
495
517
496
518
// StringIndented returns an indented string representation of the header.
0 commit comments