Store CX receipts in blocks in CrossTxEpoch

Previously, CX receipt storage started at CrossTxEpoch+1, causing
incoming CX receipts in blocks in CrossTxEpoch to be lost.
pull/1964/head
Eugene Kim 5 years ago
parent 43c9bb46fc
commit 4a326b33e4
  1. 2
      core/blockchain.go

@ -1102,7 +1102,7 @@ func (bc *BlockChain) WriteBlockWithState(
//// Cross-shard txns //// Cross-shard txns
epoch := block.Header().Epoch() epoch := block.Header().Epoch()
if bc.chainConfig.AcceptsCrossTx(block.Epoch()) { if bc.chainConfig.HasCrossTxFields(block.Epoch()) {
shardingConfig := shard.Schedule.InstanceForEpoch(epoch) shardingConfig := shard.Schedule.InstanceForEpoch(epoch)
shardNum := int(shardingConfig.NumShards()) shardNum := int(shardingConfig.NumShards())
for i := 0; i < shardNum; i++ { for i := 0; i < shardNum; i++ {

Loading…
Cancel
Save