@@ -88,27 +88,27 @@ pub enum Error {
88
88
impl fmt:: Display for Error {
89
89
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
90
90
match * self {
91
+ Error :: InvalidMagic => f. write_str ( "invalid magic" ) ,
92
+ Error :: MissingUtxo => f. write_str ( "UTXO information is not present in PSBT" ) ,
93
+ Error :: InvalidSeparator => f. write_str ( "invalid separator" ) ,
94
+ Error :: PsbtUtxoOutOfbounds => f. write_str ( "output index is out of bounds of non witness script output array" ) ,
91
95
Error :: InvalidKey ( ref rkey) => write ! ( f, "invalid key: {}" , rkey) ,
92
96
Error :: InvalidProprietaryKey => write ! ( f, "non-proprietary key type found when proprietary key was expected" ) ,
93
97
Error :: DuplicateKey ( ref rkey) => write ! ( f, "duplicate key: {}" , rkey) ,
94
- Error :: UnexpectedUnsignedTx { expected : ref e, actual : ref a } => write ! ( f, "different unsigned transaction: expected {}, actual {}" , e. txid( ) , a. txid( ) ) ,
95
- Error :: NonStandardSighashType ( ref sht) => write ! ( f, "non-standard sighash type: {}" , sht) ,
96
- Error :: InvalidMagic => f. write_str ( "invalid magic" ) ,
97
- Error :: InvalidSeparator => f. write_str ( "invalid separator" ) ,
98
98
Error :: UnsignedTxHasScriptSigs => f. write_str ( "the unsigned transaction has script sigs" ) ,
99
99
Error :: UnsignedTxHasScriptWitnesses => f. write_str ( "the unsigned transaction has script witnesses" ) ,
100
100
Error :: MustHaveUnsignedTx => {
101
101
f. write_str ( "partially signed transactions must have an unsigned transaction" )
102
102
}
103
103
Error :: NoMorePairs => f. write_str ( "no more key-value pairs for this psbt map" ) ,
104
+ Error :: UnexpectedUnsignedTx { expected : ref e, actual : ref a } => write ! ( f, "different unsigned transaction: expected {}, actual {}" , e. txid( ) , a. txid( ) ) ,
105
+ Error :: NonStandardSighashType ( ref sht) => write ! ( f, "non-standard sighash type: {}" , sht) ,
104
106
Error :: HashParseError ( e) => write ! ( f, "Hash Parse Error: {}" , e) ,
105
- Error :: MissingUtxo => f. write_str ( "UTXO information is not present in PSBT" ) ,
106
- Error :: PsbtUtxoOutOfbounds => f. write_str ( "output index is out of bounds of non witness script output array" ) ,
107
107
Error :: InvalidPreimageHashPair { ref preimage, ref hash, ref hash_type} => {
108
108
// directly using debug forms of psbthash enums
109
109
write ! ( f, "Preimage {:?} does not match {:?} hash {:?}" , preimage, hash_type, hash )
110
- }
111
- Error :: CombineInconsistentKeySources ( ref s) => { write ! ( f, "combine conflict: {}" , s) }
110
+ } ,
111
+ Error :: CombineInconsistentKeySources ( ref s) => { write ! ( f, "combine conflict: {}" , s) } ,
112
112
Error :: ConsensusEncoding => f. write_str ( "bitcoin consensus or BIP-174 encoding error" ) ,
113
113
}
114
114
}
0 commit comments