fixes to complete mainline_bitcoind merge