ruby-on-rails - 如何在Peatio中添加比特币?

标签 ruby-on-rails ruby bitcoin bitcoind bitcoin-testnet

enter image description here 我创建了测试比特币,但如何将其存入 Peatio。

货币.yml

    - id: 2
      key: satoshi
      code: btc
      symbol: "฿"
      coin: true
      quick_withdraw_max: 1000
      rpc: http://test_user_123:ddd545a1142f7fd3e167cd60e60d0a67@127.0.0.1:18332
      blockchain: https://testnet.smartbit.com.au/tx/e9d09a0401080e299c3871ba8e3bf537ab20734567cb86ea7a63d9a025b1a8f3
      address_url: https://testnet.smartbit.com.au/address/msCgLuJQNiRnXEg9AJzgpzC1qxehFNWkfH
      assets:
        balance: 3333
        accounts:
          -
            address: msCgLuJQNiRnXEg9AJzgpzC1qxehFNWkfH 

比特币.conf

            server=1
            daemon=1

            # If run on the test network instead of the real bitcoin network
            testnet=1

            # You must set rpcuser and rpcpassword to secure the JSON-RPC api
            # Please make rpcpassword to something secure, `5gKAgrJv8CQr2CGUhjVbBFLSj29HnE6YGXvfykHJzS3k` for example.
            # Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)
            rpcuser=test_user_123
            rpcpassword=ddd545a1142f7fd3e167cd60e60d0a67
            rpcport=18332

            # Notify when receiving coins
            walletnotify=curl http://192.168.1.41:3000/payment_transaction/btc/%s

我看不到我的比特币资金中的余额。这可能是什么原因?

服务器跟踪:

        Started GET "/payment_transaction/btc/dc06e9864d3114ea814118f6c9b578d52f67874477ff0b546e79b360775e1117" for 192.168.1.41 at 2017-10-25 18:57:00 +0530

    ActionController::RoutingError (No route matches [GET] "/payment_transaction/btc/dc06e9864d3114ea814118f6c9b578d52f67874477ff0b546e79b360775e1117"):
      lib/middleware/security.rb:11:in `call'
      lib/middleware/i18n_js.rb:9:in `call'

最佳答案

我不确定为什么,但似乎没有正确配置 bitcoind。

所以,首先我手动完成了这个。找到您所做的交易 ID 并手动调用它。

  1. 要么你可以尝试使用与你正在做的相同的方式,只需将 curl 作为 POST 请求。 (对我来说,它是 webhooks/tx)(https://github.com/peatio/peatio/issues/79#issuecomment-44631111)
  2. 另一种选择是,您可以调用 /usr/local/sbin/rabbitmqadmin publish routing_key=peatio.deposit.coin payload='{"txid":"YOUR_TRANS_ID_HERE", "channel_key":"satoshi"}'

它现在在 peatio 中显示余额!

关于ruby-on-rails - 如何在Peatio中添加比特币?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46907132/

相关文章:

ruby-on-rails - 多对多不同查询

ruby-on-rails - 调用保存时触发 Rails belongs_to

ruby-on-rails - 如何从 secret.yml 文件调用函数

bitcoin - 比特币矿工如何检查双花或超支?

php - 如何使用 coinbase api 和 php 获取具有新地址的字符串

bitcoin - 比特币区 block 链可以用作 SHA-256 的彩虹表吗?

ruby-on-rails - Node.js 和 Rails 应用程序托管,具有共享 MongoDB 数据库和定价

ruby-on-rails - FriendlyId 在模型验证之前触发。我该如何解决这个问题?

ruby - 使用 .next 递增字母

ruby : How can I detect/intelligently guess the delimiter used in a CSV file?