Enable extended data on stakes and general cleanup
This commit is contained in:
@@ -123,8 +123,8 @@ static bool SignStepCC(const BaseSignatureCreator& creator, const CScript& scrip
|
||||
scriptPubKey.IsPayToCryptoCondition(&subScript, vParams);
|
||||
if (vParams.size() > 1 && (p = COptCCParams(vParams[0])).IsValid())
|
||||
{
|
||||
bool is1of2 = (p.n == 1 && p.m == 1);
|
||||
uint32_t extraAddrs = p.m;
|
||||
bool is1of2 = (p.m == 1 && p.n == 2);
|
||||
uint32_t extraAddrs = p.n;
|
||||
CKey privKey;
|
||||
|
||||
// get information to sign with
|
||||
|
||||
@@ -91,12 +91,12 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
|
||||
if (vParams.size())
|
||||
{
|
||||
COptCCParams cp = COptCCParams(vParams[0]);
|
||||
if (cp.IsValid() && vParams.size() > cp.m)
|
||||
if (cp.IsValid() && vParams.size() > cp.n)
|
||||
{
|
||||
// all addresses that should be there must be 20 byte keyIDs
|
||||
for (int i = 1; i <= cp.m; i++)
|
||||
// all addresses that should be there must be 33 byte pub keys
|
||||
for (int i = 1; i <= cp.n; i++)
|
||||
{
|
||||
if (vParams[i].size() != 20)
|
||||
if (vParams[i].size() != 33)
|
||||
{
|
||||
// we accept no errors
|
||||
return false;
|
||||
|
||||
@@ -90,7 +90,7 @@ class COptCCParams
|
||||
|
||||
uint8_t version;
|
||||
uint8_t evalCode;
|
||||
uint8_t n, m; // for n of m sigs required, m addresses for sigs will follow
|
||||
uint8_t m, n; // for m of n sigs required, n pub keys for sigs will follow
|
||||
|
||||
COptCCParams() : version(0), evalCode(0), n(0), m(0) {}
|
||||
|
||||
@@ -105,7 +105,7 @@ class COptCCParams
|
||||
evalCode = vch[1];
|
||||
n = vch[2];
|
||||
m = vch[3];
|
||||
if (version != VERSION && n == 1 && (m == 1 || m == 2))
|
||||
if (version != VERSION && m == 1 && (n == 1 || n == 2))
|
||||
{
|
||||
// we only support one version, and 1 of 1 or 1 of 2 now, so set invalid
|
||||
version = 0;
|
||||
|
||||
Reference in New Issue
Block a user