Open extra topbar

If you are new here, please see some information on how to ask for support. Thank you!

I’m getting ready to replace my hacked up monero adapter with yours

dashed-slug.net Forums TurtleCoin Adapter extension support I’m getting ready to replace my hacked up monero adapter with yours

Viewing 9 posts - 31 through 39 (of 39 total)
  • Author
    Posts
  • #8916
    alexg
    Keymaster

    OK, so there’s your culprit. Can you disable W3 Total Cache and try again?

    Normally it should work as it is, but it looks like W3TC or memcached may be misconfigured, so transients are not stored.

    #8917
    alexg
    Keymaster

    Alternatively you could go to Performance -> General Settings -> Database Cache and change Database Cache Method: from memcached to disk. This will use your wp-content/cache dir for caching. It will be somewhat slower but it should work. If it does, then you can go ahead and debug your memcached server.

    #8934
    d3vnu77
    Participant

    We are connected now. Disabling cache completely did that.

    But my balance is way off… there should be about 28,000 ARMS in the wallet. But the screenshot shows… much more

    And my admin account shows… -40,700 ARMS

    This is hooked up to a copy of the original server wallet renamed to n2aa.org.wallet

    Attachments:
    You must be logged in to view attached files.
    #8939
    d3vnu77
    Participant

    It is also displaying the balance with 4 decimals instead of 8 decimals.

    Through the API, it looks like it is slowly scanning the block-chain (as seen in screenshot)

    Attachments:
    You must be logged in to view attached files.
    #8942
    alexg
    Keymaster

    Hello,

    That’s great news!

    To understand the differences between the “Hot Wallet Balance”, “User Balances”, and “Unavailable Balance”, see the Glossary chapter in the documentation.

    In short, the “Hot Wallet Balance” is the result of the /balance call to the wallet-api. The “User Balance” is the sum of transactions for any one user.

    To find out why your balance is negative, inspect your user’s transactions.

    The adapter is supposed to scan the wallet on each cron job, with increasing block heights to conserve bandwidth. The first time it retrieves most of the transactions, and on subsequent runs it scans the remaining blocks that have not yet been scanned. This is expected behavior. If you want to see the logic behind this, it’s at the function cron_discover_deposits().

    with regards

    #8943
    alexg
    Keymaster

    The number of decimals is set in the filter that defines the coins.

    The filter is initialized with values in assets/coins.csv

    ARMS,2ACoin,100,0.00001,arms:%s,%01.4f,https://explorer.2acoin.org/?hash=%s#blockchain_transaction,,4

    %01.4f is the pattern for displaying amounts, and the last value of 4 is the number of decimals. These values should match.

    To modify the values, use the wallets_turtle_coins filter described in the adapter’s homepage, to modify the values. Something like:

    
    function wallets_turtlecoin_adapter_filter( $coins ) {
        $coins['ARMS']['amount pattern'] = '%01.8f';
        $coins['ARMS']['decimals'] = 8;
    
        return $coins;
    }
    add_filter( 'wallets_turtle_coins', 'wallets_turtlecoin_adapter_filter' );
    

    However, I don’t think it’s necessary, as 2ACoin has 4 decimals I believe.

    with regards

    EDIT: Changed $coins['2ACOIN'] to the correct indexing, $coins['ARMS'].

    #8946
    d3vnu77
    Participant

    Ok. currently waiting for the blocks to continue scanning. We are to 406000 height at the moment. When it finishes we can check to see if there are still issues.

    #8947
    d3vnu77
    Participant

    Unless there is a faster way to force the scanning of the blocks?

    #8948
    alexg
    Keymaster

    Not sure but I believe that when the scan finishes, your user balances may not be correct.
    1. If a balance is negative, is it possible that you have deleted or cancelled a deposit?

    2. The hot wallet balance will remain as is after the plugin syncs with the wallet.

    If your blockchain daemon is synced to the network, and the wallet api is synced to the blockchain, then the plugin will also sync. If you want to make the plugin go faster, you can go to Wallets -> Cron job and trigger the cron job url several times.

    It would be best if you could start with a new wallet and empty wp_wallets_txs DB table, if you are building a new site.

    Please let me know what you find.

    with regards

Viewing 9 posts - 31 through 39 (of 39 total)
  • You must be logged in to reply to this topic.