NetworksRelease VersioningOffline transaction signingGlossary
Hardfork Update Process

event/onReorganizeChain

Streams block headers when the chain reorganizes from a fork. oldHead is the head of the chain before the reorg, newHead is the head of the chain after the reorg, and fork is the header for the block at which the two forks diverged.

Request Body 

undefined

Response 

{
  oldHead: {
    hash: string
    sequence: number
    previousBlockHash: string
    timestamp: number
    difficulty: string
    graffiti: string
  }
  newHead: {
    hash: string
    sequence: number
    previousBlockHash: string
    timestamp: number
    difficulty: string
    graffiti: string
  }
  fork: {
    hash: string
    sequence: number
    previousBlockHash: string
    timestamp: number
    difficulty: string
    graffiti: string
  }
}

Example 

# Request
curl -X POST -N http://localhost:8021/event/onReorganizeChain

# Response
{
  "data": {
    "oldHead": {
      "hash": "00000030b706cf005ca5674db2302ef3730cd249de0d8863de88292000f7c54d",
      "sequence": 2086,
      "previousBlockHash": "0000002fa93db186de8ff1638675c2fccc5dc36e9fd897a74182c434f4cadda5",
      "timestamp": 1688076914718,
      "difficulty": "50313867",
      "graffiti": "0000000000000000000000000000000000000000000000000000000000000000"
    },
    "newHead": {
      "hash": "0000001a42a0241e616e2b3a0c8901c15b6207d6ec8573ae8d0915d43a3514b3",
      "sequence": 2085,
      "previousBlockHash": "0000004788e98bb3f7c7b714a4f69b891b2cd72a3edf876c40882eb3f0bed76a",
      "timestamp": 1688076888411,
      "difficulty": "50240925",
      "graffiti": "0000000000000000000000000000000000000000000000000000000000000000"
    },
    "fork": {
      "hash": "0000004788e98bb3f7c7b714a4f69b891b2cd72a3edf876c40882eb3f0bed76a",
      "sequence": 2084,
      "previousBlockHash": "000000195fd83c2515a5f1e69cc80a0c57d38d43a749bc662ca373b15097c817",
      "timestamp": 1688076705815,
      "difficulty": "50537037",
      "graffiti": "0000000000000000000000000000000000000000000000000000000000000000"
    }
  }
}

View on Github 

Join our newsletter and stay up to date with privacy and crypto.

Discover our impactful presence — read our blog.

Learn

  • FAQ
  • Whitepaper
  • Tokenomics

Use

  • Get Started
  • Node App
  • Mine
  • Block Explorer
  • Ecosystem

Developers

  • Documentation
  • Github
  • Bug Bounty

Community

  • Foundation
  • Governance
  • Grants
  • Our Community

Company

  • About Us
  • Media Kit
  • Contact Us
Privacy Policy

|

Copyright 2023 Iron Fish.