Skip to content

Transaction Flow

Ro Savage edited this page Mar 13, 2018 · 2 revisions

Simplified

  • User creates Estimate
  • User confirms estimate
  • User sends to coin address

  • Check list of Unspent transactions every X seconds
  • Look up wallet address for unspent, and confirm amount VS database entry estimate (+/- ?? %)
  • Create new NavTech RAW transaction, sending to the 'To' address in the database
  • Updated database to say 'Sent'

Detailed

  • Setup the process handler (runs the cron job and manages the top level program flow).
  • Run Pre flight to determine if we can process.
  • Check the daemon is responsive.
  • Check the block height is within X blocks of the highest block seen.
  • Check the wallet is unlocked.
  • Check if we can communicate with at least 1 NavTech Server.
  • If any of the preflight checks fail, we pause the service and write to the database a flag to stop new transactions being submitted.
  • Retrieve and format the pending transactions
  • Get the unspent transactions and start to build the object we need to create the NavTech transaction
  • Loop through each unspent
  • Look it up by address in the database
  • Get the output currency and output address and attach that to the unspent data
  • Push successful transactions into a successfully prepared object
  • Push any unsuccessful ones into a failed object
  • Processing the successfully prepared transactions
  • Looping through each of the prepared transactions and creating the anontx with the nav daemon
  • If it was successfully committed to the blockchain update the database
  • Otherwise, push it into the failed transaction
  • Process any which failed to prepare or failed to send
  • Reject coins to sender
  • Update the database

Clone this wiki locally