Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion data/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ type Block struct {
ScheduledData *ScheduledData `json:"scheduledData,omitempty"`
EpochStartShardsData []*EpochStartShardData `json:"epochStartShardsData,omitempty"`
Proof *api.HeaderProof `json:"proof,omitempty"`
PreviousHeaderProof *api.HeaderProof `json:"previousHeaderProof,omitempty"`
RandSeed string `json:"randSeed,omitempty"`
PrevRandSeed string `json:"prevRandSeed,omitempty"`
Signature string `json:"signature,omitempty"`
Expand Down
7 changes: 0 additions & 7 deletions process/elasticproc/block/blockProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,6 @@ func addProofs(elasticBlock *data.Block, obh *outport.OutportBlockWithHeader) {
elasticBlock.Proof = proofToAPIProof(obh.BlockData.HeaderProof)
elasticBlock.PubKeyBitmap = elasticBlock.Proof.PubKeysBitmap
}

prevHeaderProof := obh.Header.GetPreviousProof()
if check.IfNilReflect(prevHeaderProof) {
return
}
elasticBlock.PreviousHeaderProof = proofToAPIProof(prevHeaderProof)

}

func proofToAPIProof(headerProof coreData.HeaderProofHandler) *api.HeaderProof {
Expand Down
22 changes: 1 addition & 21 deletions process/elasticproc/block/blockProcessor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,6 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) {
TxCount: 120,
},
},
PreviousHeaderProof: &dataBlock.HeaderProof{
PubKeysBitmap: []byte("bitmap"),
AggregatedSignature: []byte("sig"),
HeaderHash: []byte("hash"),
HeaderEpoch: 1,
HeaderNonce: 3,
HeaderShardId: 2,
HeaderRound: 4,
IsStartOfEpoch: true,
},
}

headerBytes, _ := bp.marshalizer.Marshal(header)
Expand Down Expand Up @@ -321,7 +311,7 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) {
Proposer: 0,
Validators: nil,
PubKeyBitmap: "6269746d617031",
Size: 1090,
Size: 925,
SizeTxs: 0,
Timestamp: 0,
StateRootHash: "",
Expand Down Expand Up @@ -369,16 +359,6 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) {
HeaderRound: 2,
IsStartOfEpoch: false,
},
PreviousHeaderProof: &api.HeaderProof{
PubKeysBitmap: "6269746d6170",
AggregatedSignature: "736967",
HeaderHash: "68617368",
HeaderEpoch: 1,
HeaderNonce: 3,
HeaderShardId: 2,
HeaderRound: 4,
IsStartOfEpoch: true,
},
EpochStartShardsData: []*data.EpochStartShardData{
{
ShardID: 1,
Expand Down