LoginSignup
0
0

More than 3 years have passed since last update.

kotod で koto のマイニングの税計算を行う

Last updated at Posted at 2020-05-05

koto, マイニングしすぎて transaction 数が多く, block explorer サービス経由で取得するのも面倒なので,
kotod でブロックチェーンから直接トランザクションを取得してみます.

2020/05/05 時点での最新の koto 2.1.2 を使います.

kotod, koto-cli の中身はほぼ zcash(bitcoind + alpha) なので, zcashd/bitcoind のやりかたを周到します.

zcashd で ZCash マイニングの税計算を行う
https://qiita.com/syoyo/items/32e6ed62e49a92df56f7

総トランザクション数を getwalletinfo で取得します.
(chain が同期していないと, 総トランザクション数は変わりますので, chain が同期してから動かしましょう)

$ ./koto-cli getwalletinfo

txcount を使います.
その後 txcount の値を使って listtransactions します.

$ ./koto-cli listtransactions "*" 2126 > tx.json

jq あたりで, txcount の値と配列要素が一致するか確認しておきましょう.

$ jq '. | length' < tx.json

あとは JSON をよろしく python などで処理すれば完成です!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0