bitcoinj/core
Andreas Schildbach 284fbcc20f SPVBlockStore: fix get() locates an invalid block if called with zero hash
This happens if the store is relatively fresh and has not yet fully wrapped
around at least once. Thus, entire entries of the ring buffer are still
zeroed, and in particular the hash field of store entries will be zero. In
consequence, get() is locating and returning an invalid block when asked to
look for the zero hash.

Valid blocks that hash to zero will require an astronomical amount of
mining. So we fix this bug by hardcoding the zero hash to never be found in
our store.

Includes a test for this edge case.
2025-03-10 10:56:24 +01:00
..
src SPVBlockStore: fix get() locates an invalid block if called with zero hash 2025-03-10 10:56:24 +01:00
build.gradle GuardedBy: use internal annotation rather than from external library 2025-02-27 21:08:17 +01:00
findbugs.xml Renamespace to org.bitcoinj away from com.google.bitcoin, as bitcoinj is no longer a Google project and being namespaced under com.google causes issues with Sonatype/Maven Central. 2014-09-30 17:05:07 +02:00