File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -102,14 +102,20 @@ export interface StateMachineUpdate extends ChunkMetadata {
102102 // local_supported_signer_protocol_version: u64,
103103}
104104
105+ // https://github.com/stacks-network/stacks-core/blob/develop/libsigner/src/v0/messages.rs#L191
106+ export interface BlockPreCommitChunkType extends ChunkMetadata {
107+ messageType : 'BlockPreCommit' ;
108+ }
109+
105110export type ParsedStackerDbChunk =
106111 | BlockProposalChunkType
107112 | BlockResponseChunkType
108113 | BlockPushedChunkType
109114 | MockProposalChunkType
110115 | MockSignatureChunkType
111116 | MockBlockChunkType
112- | StateMachineUpdate ;
117+ | StateMachineUpdate
118+ | BlockPreCommitChunkType ;
113119
114120export function parseStackerDbChunk ( chunk : StackerDbChunk ) : ParsedStackerDbChunk [ ] {
115121 return chunk . modified_slots . flatMap ( msg => {
@@ -144,6 +150,7 @@ enum SignerMessageTypePrefix {
144150 MockSignature = 4 ,
145151 MockBlock = 5 ,
146152 StateMachineUpdate = 6 ,
153+ BlockPreCommit = 7 ,
147154}
148155
149156// https://github.com/stacks-network/stacks-core/blob/cd702e7dfba71456e4983cf530d5b174e34507dc/libsigner/src/v0/messages.rs#L206
@@ -186,6 +193,10 @@ function parseSignerMessage(msg: Buffer) {
186193 return {
187194 messageType : 'StateMachineUpdate' ,
188195 } as const ;
196+ case SignerMessageTypePrefix . BlockPreCommit :
197+ return {
198+ messageType : 'BlockPreCommit' ,
199+ } as const ;
189200 default :
190201 throw new Error ( `Unknown message type prefix: ${ messageType } ` ) ;
191202 }
Original file line number Diff line number Diff line change @@ -106,6 +106,10 @@ export class PgWriteStore extends BasePgStoreModule {
106106 // ignore
107107 break ;
108108 }
109+ case 'BlockPreCommit' : {
110+ // ignore
111+ break ;
112+ }
109113 default : {
110114 this . logger . error ( chunk , `Unknown StackerDB event type` ) ;
111115 break ;
You can’t perform that action at this time.
0 commit comments