Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c75b1d464b | |||
| b3e74bffda | |||
| c696b5b43f |
@@ -4,7 +4,8 @@ Node-CryptoForkNote-Util with Merged Mining support
|
||||
Installing locally and testing
|
||||
-----
|
||||
```
|
||||
npm install https://github.com/MoneroOcean/node-cryptoforknote-util
|
||||
JOBS=$(nproc) npm install https://github.com/MoneroOcean/node-cryptoforknote-util
|
||||
node_modules/cryptoforknote-util/tests/run.sh
|
||||
```
|
||||
|
||||
Dependencies
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
"target_name": "cryptoforknote",
|
||||
"sources": [
|
||||
"src/main.cc",
|
||||
"src/cryptonote_core/cryptonote_format_utils.cpp",
|
||||
"src/cryptonote_basic/cryptonote_format_utils.cpp",
|
||||
"src/offshore/pricing_record.cpp",
|
||||
"src/zephyr_oracle/pricing_record.cpp",
|
||||
"src/salvium_oracle/pricing_record.cpp",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cryptoforknote-util",
|
||||
"version": "15.5.10",
|
||||
"version": "15.5.12",
|
||||
"author": {
|
||||
"name": "LucasJones",
|
||||
"email": "lucasjonesdev@hotmail.co.uk"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cryptonote_core/cryptonote_basic.h"
|
||||
#include "cryptonote_basic.h"
|
||||
#include "crypto/crypto.h"
|
||||
#include "serialization/keyvalue_serialization.h"
|
||||
|
||||
@@ -1080,7 +1080,7 @@ namespace cryptonote
|
||||
if (blob_type == BLOB_TYPE_CRYPTONOTE_XHV) {
|
||||
FIELD(pricing_record)
|
||||
} else if (blob_type == BLOB_TYPE_CRYPTONOTE_SALVIUM) {
|
||||
FIELD(salvium_pricing_record)
|
||||
if (major_version >= 2) FIELD(salvium_pricing_record)
|
||||
} else if (blob_type == BLOB_TYPE_CRYPTONOTE_ZEPHYR) {
|
||||
if (major_version >= 4)
|
||||
{
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
#include "cryptonote_protocol/cryptonote_protocol_defs.h"
|
||||
#include "cryptonote_core/cryptonote_basic_impl.h"
|
||||
#include "cryptonote_core/difficulty.h"
|
||||
#include "cryptonote_basic_impl.h"
|
||||
#include "difficulty.h"
|
||||
#include "account.h"
|
||||
#include "include_base_utils.h"
|
||||
#include "crypto/crypto.h"
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <list>
|
||||
#include "serialization/keyvalue_serialization.h"
|
||||
#include "cryptonote_core/cryptonote_basic.h"
|
||||
#include "cryptonote_basic/cryptonote_basic.h"
|
||||
#include "cryptonote_protocol/blobdatatype.h"
|
||||
namespace cryptonote
|
||||
{
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include "cryptonote_core/cryptonote_basic.h"
|
||||
#include "cryptonote_core/cryptonote_format_utils.h"
|
||||
#include "cryptonote_basic/cryptonote_basic.h"
|
||||
#include "cryptonote_basic/cryptonote_format_utils.h"
|
||||
#include "common/base58.h"
|
||||
#include "serialization/binary_utils.h"
|
||||
#include <nan.h>
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR
|
||||
node sal.js || exit 1
|
||||
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
let u = require('../build/Release/cryptoforknote-util');
|
||||
|
||||
const b = Buffer.from(
|
||||
'010194a5ebb406f613c4e7514facf3e5b9923c885357b53f2b02f8e17f9721371296b99113035f00000000020001ffcb6d018f9ffec12d03125e128c041c8a2d41fab9ebe2a7a4b10afbef4e134ec7ba3151c8c730a644310353414c3c7334015f99bdbbe70161dafb2da2fd9a4285da893a7519cff350981a959f525c43e5c60211000000000000000000000000000000000001e3c7bfb00b00020001ffcb6d0023016b6961b458286074406192961c1f0e5236455f45fcd6c175c7142d6353a481d60400020000'
|
||||
, 'hex');
|
||||
const b2 = u.convert_blob(b, 15);
|
||||
|
||||
if (b2.toString('hex') === '010194a5ebb406f613c4e7514facf3e5b9923c885357b53f2b02f8e17f9721371296b99113035f00000000ac81ca3e7bc9369e63563923187d2cfdb42eac839c7fe24e6d5d0080c96d758f02') {
|
||||
console.log('PASSED');
|
||||
} else {
|
||||
console.log('FAILED: ' + b2);
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in New Issue
Block a user