Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Wallet keeps missing transactions?  (Read 402 times)

0 Members and 1 Guest are viewing this topic.

Offline richiela

  • Newbie
  • *
  • Posts: 14
    • View Profile
Wallet keeps missing transactions?
« on: February 28, 2015, 06:21:06 PM »

I'm not sure if we're doing something wrong but our wallet keeps missing transactions that exist until we scan them manually.   Anyone have any pointers?

bittrex-deposit (locked) >>> blockchain_is_synced
true
bittrex-deposit (locked) >>> wallet_get_transaction cf3a6044
20022 transaction_not_found: transaction not found
Transaction not found!
    {"transaction_id_prefix":"cf3a6044"}
    th_a  transaction_ledger.cpp:1779 get_transaction

    {"transaction_id":"cf3a6044"}
    th_a  wallet_api.cpp:1229 wallet_get_transaction

    {}
    th_a  common_api_client.cpp:4465 wallet_get_transaction

    {"command":"wallet_get_transaction"}
    th_a  cli.cpp:626 execute_command
bittrex-deposit (locked) >>> wallet_scan_transaction cf3a6044
passphrase:
OK
TIMESTAMP           BLOCK     FROM                TO                  AMOUNT                  MEMO                                        FEE                 ID
======================================================================================================================================================================
2015-02-28T15:56:40 1908429   syntaks             bittrex-deposit     873.10000 BTS           ac69ee99ce0f4b8ebcd                         0.50000 BTS         cf3a6044
bittrex-deposit (unlocked) >>>  wallet_scan_transaction cf3a6044 true
passphrase:
OK

Offline vikram

Re: Wallet keeps missing transactions?
« Reply #1 on: February 28, 2015, 06:30:05 PM »
Scanning does not occur unless wallet is unlocked.

If that is not the problem first what is output of get_info and wallet_get_info?

Offline svk

Re: Wallet keeps missing transactions?
« Reply #2 on: February 28, 2015, 06:30:16 PM »
The wallet needs to be unlocked in order to scan new transactions, maybe that's why?
Worker: dev.bitsharesblocks

Offline richiela

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Wallet keeps missing transactions?
« Reply #3 on: February 28, 2015, 07:30:56 PM »
Hmmm I was under the impression that I could unlock the wallet, get transcations, and then lock the wallet again? ie our code looks something like this:

            BitShareX.WalletUnlock();
            var transactions = BitShareX.GetPayments(currency.BaseAddress, blockHeight);
            BitShareX.WalletLock();

My understanding is that doing an unlock will scan everything up to X block... are you saying that if the wallet is locked when the block comes in, it will not scan that block?

I don't like the idea of leaving the wallet unlocked when it doesn't' have to be, but that's what i'm hearing?



Offline richiela

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Wallet keeps missing transactions?
« Reply #4 on: February 28, 2015, 07:42:26 PM »
Other info as requested...

bittrex-deposit (locked) >>> blockchain_get_block_count
1909774
bittrex-deposit (locked) >>> get_info
{
  "blockchain_head_block_num": 1909763,
  "blockchain_head_block_age": "4 seconds old",
  "blockchain_head_block_timestamp": "2015-02-28T19:39:10",
  "blockchain_average_delegate_participation": "100.00 %",
  "blockchain_confirmation_requirement": 1,
  "blockchain_share_supply": "2,502,367,398.89601 BTS",
  "blockchain_blocks_left_in_round": 46,
  "blockchain_next_round_time": "at least 8 minutes in the future",
  "blockchain_next_round_timestamp": "2015-02-28T19:46:50",
  "client_data_dir": "/wallets/bitshares",
  "client_version": "0.6.1",
  "network_num_connections": 20,
  "network_num_connections_max": 200,
  "network_chain_downloader_running": false,
  "network_chain_downloader_blocks_remaining": null,
  "ntp_time": "2015-02-28T19:39:13",
  "ntp_time_error": -7.2327349999999999,
  "wallet_open": true,
  "wallet_unlocked": false,
  "wallet_unlocked_until": null,
  "wallet_unlocked_until_timestamp": null,
  "wallet_last_scanned_block_timestamp": null,
  "wallet_scan_progress": null,
  "wallet_block_production_enabled": null,
  "wallet_next_block_production_time": null,
  "wallet_next_block_production_timestamp": null
}
bittrex-deposit (locked) >>> wallet_get_info
{
  "data_dir": "/wallets/bitshares/wallets",
  "num_scanning_threads": 4,
  "open": true,
  "name": "bittrex-deposit",
  "automatic_backups": true,
  "transaction_scanning_enabled": true,
  "last_scanned_block_num": 1909719,
  "last_scanned_block_timestamp": "2015-02-28T19:31:50",
  "transaction_fee": "0.50000 BTS",
  "transaction_expiration_secs": 4040,
  "unlocked": false,
  "unlocked_until": null,
  "unlocked_until_timestamp": null,
  "scan_progress": null,
  "version": 109
}

Offline vikram

Re: Wallet keeps missing transactions?
« Reply #5 on: February 28, 2015, 08:57:46 PM »
Hmmm I was under the impression that I could unlock the wallet, get transcations, and then lock the wallet again? ie our code looks something like this:

            BitShareX.WalletUnlock();
            var transactions = BitShareX.GetPayments(currency.BaseAddress, blockHeight);
            BitShareX.WalletLock();

My understanding is that doing an unlock will scan everything up to X block... are you saying that if the wallet is locked when the block comes in, it will not scan that block?

I don't like the idea of leaving the wallet unlocked when it doesn't' have to be, but that's what i'm hearing?

Shortly after unlocking, it will begin to scan any unscanned blocks asynchronously in the background.

It seems like you need to wait until wallet_get_info["last_scanned_block_num"] is up to date before you can check for transactions.

Offline richiela

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Wallet keeps missing transactions?
« Reply #6 on: February 28, 2015, 11:21:20 PM »
Hmmm I was under the impression that I could unlock the wallet, get transcations, and then lock the wallet again? ie our code looks something like this:

            BitShareX.WalletUnlock();
            var transactions = BitShareX.GetPayments(currency.BaseAddress, blockHeight);
            BitShareX.WalletLock();

My understanding is that doing an unlock will scan everything up to X block... are you saying that if the wallet is locked when the block comes in, it will not scan that block?

I don't like the idea of leaving the wallet unlocked when it doesn't' have to be, but that's what i'm hearing?

Shortly after unlocking, it will begin to scan any unscanned blocks asynchronously in the background.

It seems like you need to wait until wallet_get_info["last_scanned_block_num"] is up to date before you can check for transactions.

Thanks this info is super useful... Last question... if last_scanned_block_num is up to date, does that mean all previous transactions have been scanned?  For example, if i can't find a transaction, and the last_scanned_block_num is up to date, something else bad is going on?

Offline vikram

Re: Wallet keeps missing transactions?
« Reply #7 on: March 01, 2015, 01:09:44 AM »
Hmmm I was under the impression that I could unlock the wallet, get transcations, and then lock the wallet again? ie our code looks something like this:

            BitShareX.WalletUnlock();
            var transactions = BitShareX.GetPayments(currency.BaseAddress, blockHeight);
            BitShareX.WalletLock();

My understanding is that doing an unlock will scan everything up to X block... are you saying that if the wallet is locked when the block comes in, it will not scan that block?

I don't like the idea of leaving the wallet unlocked when it doesn't' have to be, but that's what i'm hearing?

Shortly after unlocking, it will begin to scan any unscanned blocks asynchronously in the background.

It seems like you need to wait until wallet_get_info["last_scanned_block_num"] is up to date before you can check for transactions.

Thanks this info is super useful... Last question... if last_scanned_block_num is up to date, does that mean all previous transactions have been scanned?  For example, if i can't find a transaction, and the last_scanned_block_num is up to date, something else bad is going on?

This should generally be the case. I'm sure weird stuff can happen though if you manually scan block intervals or interrupt existing scans, etc.

Offline vikram

Re: Wallet keeps missing transactions?
« Reply #8 on: March 05, 2015, 06:38:22 PM »
Depending on your needs, you may also find this feature useful in the next version: https://github.com/BitShares/bitshares/issues/1250

 

Google+