we could change the fetch_history to take in a chain::script? or a hash_digest that captures the hash of the chain::script instead?
I'll have to look at how and where fetch_history is called from, but still I might not be the best one to make a call on this. My gut says we could change fetch_history to accept a script and we do the hashing in fetch_history instead.