@@ -3251,7 +3251,7 @@ public void bip143Test()
32513251 {
32523252 Transaction tx = Transaction . Parse ( "0100000002fff7f7881a8099afa6940d42d1e7f6362bec38171ea3edf433541db4e4ad969f0000000000eeffffffef51e1b804cc89d182d279655c3aa89e815b1b309fe287d9b2b55d57b90ec68a0100000000ffffffff02202cb206000000001976a9148280b37df378db99f66f85c95a783a76ac7a6d5988ac9093510d000000001976a9143bde42dbee7e4dbe6a21b2d50ce2f0167faa815988ac11000000" , Network ) ;
32533253 var output = tx . Outputs . CreateNewTxOut ( Money . Satoshis ( 0x23c34600L ) , new Script ( Encoders . Hex . DecodeData ( "76a9141d0f172a0ecb48aee1be1f2687d2963ae33f71a188ac" ) ) ) ;
3254- var h = tx . GetSignatureHash ( output . ScriptPubKey , 1 , SigHash . All , output , HashVersion . Witness ) ;
3254+ var h = tx . GetSignatureHash ( output . ScriptPubKey , 1 , SigHash . All , output , HashVersion . WitnessV0 ) ;
32553255 Assert . Equal ( new uint256 ( Encoders . Hex . DecodeData ( "c37af31116d1b27caf68aae9e3ac82f1477929014d5b917657d0eb49478cb670" ) , true ) , h ) ;
32563256 }
32573257 [ Fact ]
@@ -3490,21 +3490,21 @@ public void CheckScriptCoinIsCoherent()
34903490 scriptCoin = new ScriptCoin ( c , key . PubKey . WitHash . ScriptPubKey ) ;
34913491 Assert . True ( scriptCoin . RedeemType == RedeemType . P2SH ) ;
34923492 Assert . True ( scriptCoin . IsP2SH ) ;
3493- Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . Witness ) ;
3493+ Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . WitnessV0 ) ;
34943494
34953495 //P2WSH
34963496 c . ScriptPubKey = key . PubKey . ScriptPubKey . WitHash . ScriptPubKey ;
34973497 scriptCoin = new ScriptCoin ( c , key . PubKey . ScriptPubKey ) ;
34983498 Assert . True ( scriptCoin . RedeemType == RedeemType . WitnessV0 ) ;
34993499 Assert . True ( ! scriptCoin . IsP2SH ) ;
3500- Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . Witness ) ;
3500+ Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . WitnessV0 ) ;
35013501
35023502 //P2SH(P2WSH)
35033503 c . ScriptPubKey = key . PubKey . ScriptPubKey . WitHash . ScriptPubKey . Hash . ScriptPubKey ;
35043504 scriptCoin = new ScriptCoin ( c , key . PubKey . ScriptPubKey ) ;
35053505 Assert . True ( scriptCoin . RedeemType == RedeemType . WitnessV0 ) ;
35063506 Assert . True ( scriptCoin . IsP2SH ) ;
3507- Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . Witness ) ;
3507+ Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . WitnessV0 ) ;
35083508
35093509
35103510 Assert . Throws < ArgumentException > ( ( ) => new ScriptCoin ( c , key . PubKey . ScriptPubKey . WitHash . ScriptPubKey ) ) ;
0 commit comments