Number of required confirmations must be between 0 and 2881

Issue #31 resolved
brule_herman created an issue

java.lang.IllegalArgumentException: Number of required confirmations must be between 0 and 2881 at Nxt$Account.getGuaranteedBalance(Nxt.java:660) at Nxt$Account.getEffectiveBalance(Nxt.java:516) at Nxt$8.run(Nxt.java:6711) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

Comments (6)

  1. Jean-Luc Picard repo owner

    I don't understand. How are you getting this error? Account.getEffectiveBalance() calls getGuaranteedBalance(1440), the number of required confirmations is hardcoded to 1440. I cannot support arbitrarily large number of confirmations, and there is no need for that because blockchain rearrangements can never go back further than 1440 blocks. Anything older than that will never be rolled back.

  2. brule_herman reporter

    The client in loaded, my account unlocked, and I try forging. I have just do transfer from dgex to my account, unlock the client, and I'm waiting to forging. When I pass the cursor on my transaction, I see on the tooltip more than 4000+ confirmation. Same when I reset the blockchain.

  3. Jean-Luc Picard repo owner

    I don't know how to reproduce that. This is not related to the 4000+ confirmations. And if you just did a transaction, obviously it cannot already have that many confirmations. Does it continue to happen?

    The only way I can think of this happening is if the blockchain started a re-scan just after getEffectiveBalance() was called but before getGuaranteedBalance() was called, which should be a very rare case, but even then the error is harmless and can be ignored.

  4. Jean-Luc Picard repo owner

    I would assume this is not reproducible? No one else has reported it and I haven't been able to reproduce it either.

  5. Log in to comment