@@ -3251,7 +3251,7 @@ public void bip143Test()
3251
3251
{
3252
3252
Transaction tx = Transaction . Parse ( "0100000002fff7f7881a8099afa6940d42d1e7f6362bec38171ea3edf433541db4e4ad969f0000000000eeffffffef51e1b804cc89d182d279655c3aa89e815b1b309fe287d9b2b55d57b90ec68a0100000000ffffffff02202cb206000000001976a9148280b37df378db99f66f85c95a783a76ac7a6d5988ac9093510d000000001976a9143bde42dbee7e4dbe6a21b2d50ce2f0167faa815988ac11000000" , Network ) ;
3253
3253
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 ) ;
3255
3255
Assert . Equal ( new uint256 ( Encoders . Hex . DecodeData ( "c37af31116d1b27caf68aae9e3ac82f1477929014d5b917657d0eb49478cb670" ) , true ) , h ) ;
3256
3256
}
3257
3257
[ Fact ]
@@ -3490,21 +3490,21 @@ public void CheckScriptCoinIsCoherent()
3490
3490
scriptCoin = new ScriptCoin ( c , key . PubKey . WitHash . ScriptPubKey ) ;
3491
3491
Assert . True ( scriptCoin . RedeemType == RedeemType . P2SH ) ;
3492
3492
Assert . True ( scriptCoin . IsP2SH ) ;
3493
- Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . Witness ) ;
3493
+ Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . WitnessV0 ) ;
3494
3494
3495
3495
//P2WSH
3496
3496
c . ScriptPubKey = key . PubKey . ScriptPubKey . WitHash . ScriptPubKey ;
3497
3497
scriptCoin = new ScriptCoin ( c , key . PubKey . ScriptPubKey ) ;
3498
3498
Assert . True ( scriptCoin . RedeemType == RedeemType . WitnessV0 ) ;
3499
3499
Assert . True ( ! scriptCoin . IsP2SH ) ;
3500
- Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . Witness ) ;
3500
+ Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . WitnessV0 ) ;
3501
3501
3502
3502
//P2SH(P2WSH)
3503
3503
c . ScriptPubKey = key . PubKey . ScriptPubKey . WitHash . ScriptPubKey . Hash . ScriptPubKey ;
3504
3504
scriptCoin = new ScriptCoin ( c , key . PubKey . ScriptPubKey ) ;
3505
3505
Assert . True ( scriptCoin . RedeemType == RedeemType . WitnessV0 ) ;
3506
3506
Assert . True ( scriptCoin . IsP2SH ) ;
3507
- Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . Witness ) ;
3507
+ Assert . True ( scriptCoin . GetHashVersion ( ) == HashVersion . WitnessV0 ) ;
3508
3508
3509
3509
3510
3510
Assert . Throws < ArgumentException > ( ( ) => new ScriptCoin ( c , key . PubKey . ScriptPubKey . WitHash . ScriptPubKey ) ) ;
0 commit comments