@@ -182,6 +182,7 @@ export const mapNode = (type) => pipe(
182182 Target : path ( [ 'Process' ] ) ,
183183 Epoch : pipe ( path ( [ 'Epoch' ] ) , parseInt ) ,
184184 Nonce : pipe ( path ( [ 'Slot' ] ) ( tags ) ? path ( [ 'Slot' ] ) : path ( [ 'Nonce' ] ) , parseInt ) ,
185+ Skip : pathOr ( 'false' , [ 'Skip' ] ) ,
185186 Timestamp : pipe ( path ( [ 'Timestamp' ] ) , parseInt ) ,
186187 'Block-Height' : pipe (
187188 /**
@@ -453,7 +454,7 @@ export const loadMessagesWith = ({ hashChain, fetch, logger: _logger, pageSize }
453454 body . edges . length === ( + to - + from + 1 ) &&
454455 + body . edges [ 0 ] ?. node ?. assignment ?. Tags ?. find ( t => t . name === 'Nonce' || t . name === 'Slot' ) ?. value === + from
455456 if ( bodyIsValid ) return body
456- return fetchPageDataloader . load ( { suUrl , processId , from , to , pageSize } )
457+ throw new Error ( 'Body is not valid: would attempt to fetch from scheduler in loadMessages' )
457458 } ,
458459 { maxRetries : 5 , delay : 500 , log : logger , name : `loadMessages(${ JSON . stringify ( { suUrl, processId, params : params . toString ( ) } ) } )` }
459460 )
@@ -605,15 +606,13 @@ export const loadMessagesWith = ({ hashChain, fetch, logger: _logger, pageSize }
605606
606607export const loadMessageMetaWith = ( { fetch, logger } ) => {
607608 return async ( { suUrl, processId, messageUid, body } ) => {
608- const params = toParams ( { processId, to : messageUid , from : messageUid , pageSize : 1 } )
609-
610609 return backoff (
611610 ( ) => {
612611 const bodyIsValid = body &&
613612 body . edges . length === 1 &&
614613 + body . edges [ 0 ] ?. node ?. assignment ?. Tags ?. find ( t => t . name === 'Nonce' || t . name === 'Slot' ) ?. value === + messageUid
615614 if ( bodyIsValid ) return body
616- return fetch ( ` ${ suUrl } /~ scheduler@1.0/schedule? ${ params . toString ( ) } ` ) . then ( okRes )
615+ throw new Error ( 'Body is not valid: would attempt to fetch from scheduler in loadMessageMeta' )
617616 } ,
618617 { maxRetries : 5 , delay : 500 , log : logger , name : `loadMessageMeta(${ JSON . stringify ( { suUrl, processId, messageUid } ) } )` }
619618 )
0 commit comments