Overview

Before you test your Mesh API implementation, we recommend that you disable balance tracking and reconciliation. Balance tracking checks that the balance for an address does not go below zero. Reconciliation ensures that the balance that you calculated matches the balance returned by the /account/balance endpoint.

Reminder: After you have completed testing your Mesh API implementation, you need to enable these complex checks again! Your Mesh API implementation is complete when these complex checks pass the mesh-cli tool testing.

You can manage balance tracking with the balance_tracking_disabled field. To manage reconciliation, edit the value of the reconciliation_disabled field. These fields are part of the data object of the Mesh API configuration file.

Disabling and Enabling Complex Checks

To disable and enable balance tracking and reconciliation, perform the following steps:

  1. Disable balance tracking and reconciliation in your Mesh API implementation (the config file). Set the values for the reconciliation_disabled and balance_tracking_disabled fields to true.
  2. Run the check:data and check:construction tests with the mesh-cli tool. (Read our How to Test your Mesh API Implementation documentation.)
  3. Enable balance tracking and reconciliation in your Mesh API implementation by setting the values of the reconciliation_disabled and balance_tracking_disabled fields to false.
  4. Run the check:data and check:construction tests again.

Your Mesh API implementation is now complete.

Sample configurations

Checks disabled

{
   "network":{
      "blockchain":"Ethereum",
      "network":"Ropsten"
   },
   "online_url":"http://localhost:8080",
   "data_directory":"",
   "http_timeout":10,
   "tip_delay":300,
   "data":{
      "historical_balance_disabled":true,
      "reconciliation_disabled":true,
      "inactive_discrepancy_search_disabled":true,
      "balance_tracking_disabled":true,
      "end_conditions":{
         "tip":true
      }
   }
}

Checks enabled

{
   "network":{
      "blockchain":"Ethereum",
      "network":"Ropsten"
   },
   "online_url":"http://localhost:8080",
   "data_directory":"",
   "http_timeout":10,
   "tip_delay":300,
   "data":{
      "historical_balance_disabled":false,
      "reconciliation_disabled":false,
      "inactive_discrepancy_search_disabled":true,
      "balance_tracking_disabled":false,
      "end_conditions":{
         "tip":true
      }
   }
}