bugfix

Signed-off-by: Stéphane Depierrepont <toorop@toorop.fr>
add nextblockhash

Signed-off-by: Stéphane Depierrepont <toorop@toorop.fr>
add tests

Signed-off-by: Stéphane Depierrepont <toorop@toorop.fr>