diff --git a/package.json b/package.json index a788fd5..9784ccb 100644 --- a/package.json +++ b/package.json @@ -10,16 +10,16 @@ "url": "https://github.com/haven-protocol-org/node-cryptoforknote-util.git" }, "dependencies": { - "promise": "*", - "bindings": "*", - "nan": "^2.14.2", - "bignum": "^0.13.1", - "sha3": "*", "base58-native": "*", "bech32": "*", - "varuint-bitcoin": "^1.0.4", + "bignum": "^0.13.1", + "bindings": "*", + "bitcoinjs-lib": "git+https://github.com/MoneroOcean/bitcoinjs-lib.git", "merkle-lib": "^2.0.10", - "bitcoinjs-lib": "git+https://github.com/MoneroOcean/bitcoinjs-lib.git" + "nan": "^2.20.0", + "promise": "*", + "sha3": "*", + "varuint-bitcoin": "^1.0.4" }, "keywords": [ "cryptonight", diff --git a/src/cryptonote_core/cryptonote_basic.h b/src/cryptonote_core/cryptonote_basic.h index 082ec06..1307401 100644 --- a/src/cryptonote_core/cryptonote_basic.h +++ b/src/cryptonote_core/cryptonote_basic.h @@ -445,7 +445,7 @@ namespace cryptonote // SALVIUM-SPECIFIC FIELDS // TX type - cryptonote::salvium_transaction_type type; + cryptonote::salvium_transaction_type tx_type; // Return address crypto::public_key return_address; // Return TX public key @@ -732,10 +732,10 @@ namespace cryptonote FIELD(vin) FIELD(vout) FIELD(extra) - VARINT_FIELD(type) - if (type != cryptonote::transaction_type::PROTOCOL) { + VARINT_FIELD(tx_type) + if (type != cryptonote::salvium_transaction_type::PROTOCOL) { VARINT_FIELD(amount_burnt) - if (type != cryptonote::transaction_type::MINER) { + if (type != cryptonote::salvium_transaction_type::MINER) { FIELD(return_address) FIELD(return_pubkey) FIELD(source_asset_type) @@ -1129,7 +1129,7 @@ namespace cryptonote FIELD_N("parent_block", sbb); } FIELD(miner_tx) - if (blob_type == BLOB_TYPE_SALVIUM) + if (blob_type == BLOB_TYPE_CRYPTONOTE_SALVIUM) { FIELD(protocol_tx) } diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h index 7fa8c8f..b51ed49 100644 --- a/src/ringct/rctTypes.h +++ b/src/ringct/rctTypes.h @@ -87,6 +87,8 @@ namespace rct { typedef std::vector keyV; //vector of keys typedef std::vector keyM; //matrix of keys (indexed by column first) + static key null_key = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + //containers For CT operations //if it's representing a private ctkey then "dest" contains the secret key of the address // while "mask" contains a where C = aG + bH is CT pedersen commitment and b is the amount @@ -385,7 +387,7 @@ namespace rct { FIELDS(maskSums[2]) ar.end_array(); } - if (p_r != crypto::null_pkey) + if (crypto_verify_32(p_r.bytes, null_key.bytes)) FIELD(p_r) return ar.stream().good(); }