Skip to content

Commit 87f8bd1

Browse files
authored
Merge pull request #337 from multiversx/remove-prev-proof
Remove previous proof
2 parents c5cc3fe + 8ae6f5b commit 87f8bd1

File tree

3 files changed

+1
-29
lines changed

3 files changed

+1
-29
lines changed

data/block.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ type Block struct {
4242
ScheduledData *ScheduledData `json:"scheduledData,omitempty"`
4343
EpochStartShardsData []*EpochStartShardData `json:"epochStartShardsData,omitempty"`
4444
Proof *api.HeaderProof `json:"proof,omitempty"`
45-
PreviousHeaderProof *api.HeaderProof `json:"previousHeaderProof,omitempty"`
4645
RandSeed string `json:"randSeed,omitempty"`
4746
PrevRandSeed string `json:"prevRandSeed,omitempty"`
4847
Signature string `json:"signature,omitempty"`

process/elasticproc/block/blockProcessor.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,6 @@ func addProofs(elasticBlock *data.Block, obh *outport.OutportBlockWithHeader) {
147147
elasticBlock.Proof = proofToAPIProof(obh.BlockData.HeaderProof)
148148
elasticBlock.PubKeyBitmap = elasticBlock.Proof.PubKeysBitmap
149149
}
150-
151-
prevHeaderProof := obh.Header.GetPreviousProof()
152-
if check.IfNilReflect(prevHeaderProof) {
153-
return
154-
}
155-
elasticBlock.PreviousHeaderProof = proofToAPIProof(prevHeaderProof)
156-
157150
}
158151

159152
func proofToAPIProof(headerProof coreData.HeaderProofHandler) *api.HeaderProof {

process/elasticproc/block/blockProcessor_test.go

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -266,16 +266,6 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) {
266266
TxCount: 120,
267267
},
268268
},
269-
PreviousHeaderProof: &dataBlock.HeaderProof{
270-
PubKeysBitmap: []byte("bitmap"),
271-
AggregatedSignature: []byte("sig"),
272-
HeaderHash: []byte("hash"),
273-
HeaderEpoch: 1,
274-
HeaderNonce: 3,
275-
HeaderShardId: 2,
276-
HeaderRound: 4,
277-
IsStartOfEpoch: true,
278-
},
279269
}
280270

281271
headerBytes, _ := bp.marshalizer.Marshal(header)
@@ -321,7 +311,7 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) {
321311
Proposer: 0,
322312
Validators: nil,
323313
PubKeyBitmap: "6269746d617031",
324-
Size: 1090,
314+
Size: 925,
325315
SizeTxs: 0,
326316
Timestamp: 0,
327317
StateRootHash: "",
@@ -369,16 +359,6 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) {
369359
HeaderRound: 2,
370360
IsStartOfEpoch: false,
371361
},
372-
PreviousHeaderProof: &api.HeaderProof{
373-
PubKeysBitmap: "6269746d6170",
374-
AggregatedSignature: "736967",
375-
HeaderHash: "68617368",
376-
HeaderEpoch: 1,
377-
HeaderNonce: 3,
378-
HeaderShardId: 2,
379-
HeaderRound: 4,
380-
IsStartOfEpoch: true,
381-
},
382362
EpochStartShardsData: []*data.EpochStartShardData{
383363
{
384364
ShardID: 1,

0 commit comments

Comments
 (0)