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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/gin-gonic/gin v1.10.0
github.com/google/uuid v1.6.0
github.com/multiversx/mx-chain-communication-go v1.2.0
github.com/multiversx/mx-chain-core-go v1.3.0
github.com/multiversx/mx-chain-core-go v1.3.1
github.com/multiversx/mx-chain-logger-go v1.0.15
github.com/multiversx/mx-chain-vm-common-go v1.5.16
github.com/prometheus/client_model v0.4.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
github.com/multiversx/mx-chain-communication-go v1.2.0 h1:0wOoLldiRbvaOPxwICbnRCqCpLqPewg8M/FMbC/0OXY=
github.com/multiversx/mx-chain-communication-go v1.2.0/go.mod h1:wS3aAwkmHbC9mlzQdvL6p7l8Rqw3vmzhj7WZW1dTveA=
github.com/multiversx/mx-chain-core-go v1.3.0 h1:GhDlvwHAhG5AabgCoGxwdtTEzVCa0KPkGAKB+BtIgQ0=
github.com/multiversx/mx-chain-core-go v1.3.0/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE=
github.com/multiversx/mx-chain-core-go v1.3.1 h1:r8DAkl9a9t6z38jjbtGNrz295pBeM6fwTq91TP8xX6U=
github.com/multiversx/mx-chain-core-go v1.3.1/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE=
github.com/multiversx/mx-chain-crypto-go v1.2.12 h1:zWip7rpUS4CGthJxfKn5MZfMfYPjVjIiCID6uX5BSOk=
github.com/multiversx/mx-chain-logger-go v1.0.15 h1:HlNdK8etyJyL9NQ+6mIXyKPEBo+wRqOwi3n+m2QIHXc=
github.com/multiversx/mx-chain-logger-go v1.0.15/go.mod h1:t3PRKaWB1M+i6gUfD27KXgzLJJC+mAQiN+FLlL1yoGQ=
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: 898,
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
Loading