Skip to navigation
DigitalOcean Referral Badge

Get $200 credit on DigitalOcean

Hostinger logo

Hostinger: Lightning-fast hosting, unbeatable uptime, top-notch support!

Open extra topbar

⇄ Switching between adapters, aggregating old transactions

⇄ Switching between adapters, aggregating old transactions

Easily switch between coin adapters and aggregate past transactions to save space in version 3.1.0 of Bitcoin and Altcoin Wallets for WordPress.

Two new developments added in version 3.1.0 of Bitcoin and Altcoin Wallets:

Switching between adapters

Renew deposit addresses feature in Bitcoin and Altcoin Wallets for WordPress

You can now more easily replace the adapter for a coin with a different one:

  1. Deactivate the old adapter.
  2. Install and configure the new adapter.
  3. Enable the new adapter.
  4. Got to WalletsAdapters. Under the new adapter, select “Renew deposit addresses“. This will renew any user deposit addresses, as well as the cold storage deposit address for that coin.

There is no longer a need to edit the DB manually. The new instructions can also be found in the FAQ section of the readme file.

Aggregating old internal transactions

Old transaction aggregation feature in Bitcoin and Altcoin Wallets for WordPress

Some users have reported that the Faucet extension can fill up the database with thousands of transactions on a site with high traffic. There is now an option to aggregate past transactions into batches. This saves space in the DB without affecting user balances. Since transactions with identical tags are grouped together, this feature will group together faucet transactions but will not mix them with other internal transactions.

You can turn on this feature in the Cron job admin page.

After turning the feature on:

  • On every heartbeat, the cron mechanism determines the earliest week for which transactions that have not yet been aggregated.
  • For that week, it sums any internal transactions in “done” state for each sender, recipient, coin, blog, and set of transaction tags. Similar transactions are replaced with an aggregate transaction that is the sum of the transactions it replaced.
  • Additionally, any internal transactions in a “failed” or “cancelled” state during that week are deleted.

 

Alex

Comments:8

  1. Thank you for dashed-slug’s efforts to make quick improvements and updates. With this update, the potential of the plugin is even greater!

  2. AM happ for ths update. The first time, which was te last time I swtched adapter, it wasn’t user friendly going to the database to run a code. Now all is done at one place, a very big THANK YOU!
    I had you mention faucet, do you have faucet plugin? I have one am building with, but will love to have a set of plugin from you for this work.

  3. Thanks. I just checked in the cron admin page and noticed it is default to Max batch size of 8.

    If running a faucet, is this a bit low, or am I misunderstanding what this does?

    1. The max batch size option is in a different section than the “Old transaction aggregation” feature. It is the maximum number of withdrawals and internal transfers that are processed on every heartbeat. The transaction aggregation feature does not take any parameters at the moment. It aggregates all the identical internal transactions it can find in a one week period.

Leave a Reply

Your email address will not be published. Required fields are marked *