NetworkParameters: convert spacing and timespans to `java.time.Duration`
This is two commits:
-
BitcoinNetworkParams: move spacing, timespan, interval constants from NetworkParameters Also rename
INTERVALtoINTERVAL_BLOCKS. -
NetworkParameters: convert spacing and timespans to
java.time.Duration
Damn, the referencing of superclass to subclass at init time is clearly not liked by the VM at runtime.
Thinking about the moving of the constants again, maybe we want to move them (and their variable friends and accessors) to BitcoinNetwork? Or, if we don't want to grow that class too much, create a new hierarchy just for "blockchain parameters"?
I converted this to draft because currently it doesn't work as planned. Maybe it's better to merge the Difficulty refactor first, then decide on where the constants should really go.
But I certainly want to revisit especially the "move to java.time.Duration" commit again.