Skip to content

Commit 58675dd

Browse files
committed
fixes
1 parent a969a90 commit 58675dd

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

data/block.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type Block struct {
5151
SoftwareVersion string `json:"softwareVersion,omitempty"`
5252
ReceiptsHash string `json:"receiptsHash,omitempty"`
5353
Reserved []byte `json:"reserved,omitempty"`
54-
LeaderBLSKey string `json:"leaderBlsKey,omitempty"`
54+
ProposerBlsKey string `json:"proposerBlsKey,omitempty"`
5555
}
5656

5757
// MiniBlocksDetails is a structure that hold information about mini-blocks execution details

process/elasticproc/block/blockProcessor.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (bp *blockProcessor) PrepareBlockForDB(obh *outport.OutportBlockWithHeader)
9191
MiniBlocksHashes: miniblocksHashes,
9292
NotarizedBlocksHashes: obh.NotarizedHeadersHashes,
9393
Proposer: obh.LeaderIndex,
94-
LeaderBLSKey: hex.EncodeToString([]byte(obh.LeaderBLSKey)),
94+
ProposerBlsKey: hex.EncodeToString(obh.LeaderBLSKey),
9595
Validators: obh.SignersIndexes,
9696
PubKeyBitmap: hex.EncodeToString(obh.Header.GetPubKeysBitmap()),
9797
Size: int64(blockSizeInBytes),
@@ -145,13 +145,15 @@ func (bp *blockProcessor) PrepareBlockForDB(obh *outport.OutportBlockWithHeader)
145145
func addProofs(elasticBlock *data.Block, obh *outport.OutportBlockWithHeader) {
146146
if obh.BlockData.HeaderProof != nil {
147147
elasticBlock.Proof = proofToAPIProof(obh.BlockData.HeaderProof)
148+
elasticBlock.PubKeyBitmap = elasticBlock.Proof.PubKeysBitmap
148149
}
149150

150151
prevHeaderProof := obh.Header.GetPreviousProof()
151152
if check.IfNilReflect(prevHeaderProof) {
152153
return
153154
}
154155
elasticBlock.PreviousHeaderProof = proofToAPIProof(prevHeaderProof)
156+
155157
}
156158

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

process/elasticproc/block/blockProcessor_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) {
320320
NotarizedBlocksHashes: nil,
321321
Proposer: 0,
322322
Validators: nil,
323-
PubKeyBitmap: "",
323+
PubKeyBitmap: "6269746d617031",
324324
Size: 1090,
325325
SizeTxs: 0,
326326
Timestamp: 0,

0 commit comments

Comments
 (0)