mirror of
https://github.com/hackku21/loc-chain-backend.git
synced 2026-03-02 03:40:09 +00:00
Debug fetch requests
This commit is contained in:
@@ -226,6 +226,7 @@ export class Blockchain extends Unit {
|
||||
try {
|
||||
this.logging.verbose(`Making request to: ${peer.host}api/v1/chain/submit`)
|
||||
const result = await fetch(`${peer.host}api/v1/chain/submit`).then(res => res.json())
|
||||
console.log('got result after making request', result)
|
||||
const blocks: unknown = result.data?.data?.records
|
||||
if ( Array.isArray(blocks) && blocks.every(block => {
|
||||
return isBlockResourceItem(block)
|
||||
|
||||
Reference in New Issue
Block a user