File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ func chainSyncRollForwardHandler(
324
324
325
325
func blockFetchBlockHandler (
326
326
ctx blockfetch.CallbackContext ,
327
+ blockType uint ,
327
328
blockData ledger.Block ,
328
329
) error {
329
330
switch block := blockData .(type ) {
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ type CallbackContext struct {
101
101
}
102
102
103
103
// Callback function types
104
- type BlockFunc func (CallbackContext , ledger.Block ) error
104
+ type BlockFunc func (CallbackContext , uint , ledger.Block ) error
105
105
type RequestRangeFunc func (CallbackContext , common.Point , common.Point ) error
106
106
107
107
func New (protoOptions protocol.ProtocolOptions , cfg * Config ) * BlockFetch {
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ func (c *Client) handleBlock(msgGeneric protocol.Message) error {
191
191
}
192
192
// We use the callback when requesting ranges and the internal channel for a single block
193
193
if c .blockUseCallback {
194
- if err := c .config .BlockFunc (c .callbackContext , blk ); err != nil {
194
+ if err := c .config .BlockFunc (c .callbackContext , wrappedBlock . Type , blk ); err != nil {
195
195
return err
196
196
}
197
197
} else {
You can’t perform that action at this time.
0 commit comments