Add normalized transaction hash
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "hash.h"
|
||||
#include "tinyformat.h"
|
||||
#include "utilstrencodings.h"
|
||||
#include "script/interpreter.h"
|
||||
|
||||
std::string COutPoint::ToString() const
|
||||
{
|
||||
@@ -68,6 +69,11 @@ uint256 CMutableTransaction::GetHash() const
|
||||
return SerializeHash(*this);
|
||||
}
|
||||
|
||||
uint256 CMutableTransaction::GetNormalizedHash() const
|
||||
{
|
||||
return SignatureHash(CScript(), *this, 0, SIGHASH_ALL);
|
||||
}
|
||||
|
||||
void CTransaction::UpdateHash() const
|
||||
{
|
||||
*const_cast<uint256*>(&hash) = SerializeHash(*this);
|
||||
|
||||
Reference in New Issue
Block a user