public override uint256 GetHash() { var escrow = EscrowScriptPubKeyParameters.GetFromCoin(_Escrow); var coin = _Escrow.Clone(); coin.OverrideScriptCode(escrow.GetInitiatorScriptCode()); return(GetTransaction().GetSignatureHash(coin, SigHash.All)); }
public uint256 CreateRealHash(Transaction tx, ScriptCoin _Escrow, Money feeVariation) { /* * Not sure if this is best way to do this, but had to add this for step 7 * when verifying valid Hashes, the server will have to make real hashes, but * it doesn't have access to RealHash class. So I created this function that * takes care of that */ var escrow = EscrowScriptPubKeyParameters.GetFromCoin(_Escrow); var coin = _Escrow.Clone(); coin.OverrideScriptCode(escrow.GetInitiatorScriptCode()); var Transaction = tx.Clone(); Transaction.Outputs[0].Value -= feeVariation; return(Transaction.GetSignatureHash(coin, SigHash.All)); }