|
|
@ -158,16 +158,16 @@ func (node *Node) ProcessReceiptMessage(msgPayload []byte) { |
|
|
|
if len(merkleProof.ShardID) == 0 { |
|
|
|
if len(merkleProof.ShardID) == 0 { |
|
|
|
utils.Logger().Warn().Msg("[ProcessReceiptMessage] There is No non-empty destination shards") |
|
|
|
utils.Logger().Warn().Msg("[ProcessReceiptMessage] There is No non-empty destination shards") |
|
|
|
return |
|
|
|
return |
|
|
|
} else { |
|
|
|
} |
|
|
|
for j := 0; j < len(merkleProof.ShardID); j++ { |
|
|
|
|
|
|
|
sKey := make([]byte, 4) |
|
|
|
for j := 0; j < len(merkleProof.ShardID); j++ { |
|
|
|
binary.BigEndian.PutUint32(sKey, merkleProof.ShardID[j]) |
|
|
|
sKey := make([]byte, 4) |
|
|
|
byteBuffer.Write(sKey) |
|
|
|
binary.BigEndian.PutUint32(sKey, merkleProof.ShardID[j]) |
|
|
|
byteBuffer.Write(merkleProof.CXShardHash[j][:]) |
|
|
|
byteBuffer.Write(sKey) |
|
|
|
if merkleProof.ShardID[j] == node.Consensus.ShardID { |
|
|
|
byteBuffer.Write(merkleProof.CXShardHash[j][:]) |
|
|
|
foundMyShard = true |
|
|
|
if merkleProof.ShardID[j] == node.Consensus.ShardID { |
|
|
|
myShardRoot = merkleProof.CXShardHash[j] |
|
|
|
foundMyShard = true |
|
|
|
} |
|
|
|
myShardRoot = merkleProof.CXShardHash[j] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|