Adapting to the new signing code in haskoin
Fixing compiler warnings
Fixed heisenbug thanks to Jaume's patch