adapt for btcec changes.