Update for new rust-bitcoin API, avoid some duplicate hashing