Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for 1.1.8: Activate Sapling for Komodo and support for XSN #79

Merged
merged 4 commits into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include(UseBackportedModules)
# The project version number.
set(VERSION_MAJOR 1 CACHE STRING "Project major version number.")
set(VERSION_MINOR 1 CACHE STRING "Project minor version number.")
set(VERSION_PATCH 7 CACHE STRING "Project patch version number.")
set(VERSION_PATCH 8 CACHE STRING "Project patch version number.")
mark_as_advanced(VERSION_MAJOR VERSION_MINOR VERSION_PATCH)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 1.0.{build}
image:
- Visual Studio 2015
environment:
LIB_VERSION: 1.1.7 #Hardcode the LIB_VERSION : should be retrieved by building libcore node module and run tests/lib_version.js
LIB_VERSION: 1.1.8 #Hardcode the LIB_VERSION : should be retrieved by building libcore node module and run tests/lib_version.js
nodejs_version: "9"
appveyor_rdp_password:
secure: jb1LsDmcxCww7tA38S3xSw==
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,10 @@ namespace ledger {
std::vector<BitcoinLikePreparedInput> preparedInputs;
auto inputsCount = reader.readNextVarInt();
for (auto index = 0; index < inputsCount; index++) {
auto previousTxHash = hex::toString(reader.readNextLeBigInt(32).toByteArray());
//Previous Tx Hash in LE
auto prevTxHashBytes = reader.read(32);
std::reverse(prevTxHashBytes.begin(), prevTxHashBytes.end());
auto previousTxHash = hex::toString(prevTxHashBytes);
hadronized marked this conversation as resolved.
Show resolved Hide resolved
auto outputIndex = reader.readNextLeUint();

ledger::core::BitcoinLikeBlockchainExplorer::Output output;
Expand Down
22 changes: 19 additions & 3 deletions core/src/wallet/bitcoin/networks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ namespace ledger {
false,
0,
{sigHashType::SIGHASH_ALL},
{}
{"ZIP"}
);
return KOMODO;
} else if (networkName == "poswallet") {
Expand Down Expand Up @@ -395,6 +395,21 @@ namespace ledger {
{}
);
return DECRED;
} else if (networkName == "stakenet") {
static const api::BitcoinLikeNetworkParameters STAKENET(
"xsn",
{0x4C},
{0x10},
{0x04, 0x88, 0xB2, 0x1E},
api::BitcoinLikeFeePolicy::PER_BYTE,
10000,
"Stakenet Signed Message:\n",
false,
0,
{sigHashType::SIGHASH_ALL},
{}
);
return STAKENET;
}

throw make_exception(api::ErrorCode::INVALID_ARGUMENT, "No network parameters set for {}", networkName);
Expand Down Expand Up @@ -423,8 +438,9 @@ namespace ledger {
getNetworkParameters("poswallet"),
getNetworkParameters("pivx"),
getNetworkParameters("clubcoin"),
getNetworkParameters("decred")
getNetworkParameters("decred"),
getNetworkParameters("stakenet")
});
}
}
}
}
10 changes: 9 additions & 1 deletion core/src/wallet/currencies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,13 @@ namespace ledger {
.unit("satoshi", 0, "satoshi")
.unit("decred", 8, "DCR")
.unit("milli-decred", 5, "mDCR");
const api::Currency STAKENET =
Currency("stakenet")
.forkOfBitcoin(networks::getNetworkParameters("stakenet"))
.bip44(384)
.paymentUri("stakenet")
.unit("satoshi", 0, "satoshi")
.unit("stakenet", 8, "XSN");

const std::vector<api::Currency> ALL({
BITCOIN,
Expand All @@ -251,7 +258,8 @@ namespace ledger {
POSWALLET,
PIVX,
CLUBCOIN,
DECRED
DECRED,
STAKENET
});
}
}
Expand Down
1 change: 1 addition & 0 deletions core/src/wallet/currencies.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ namespace ledger {
extern LIBCORE_EXPORT const api::Currency PIVX;
extern LIBCORE_EXPORT const api::Currency CLUBCOIN;
extern LIBCORE_EXPORT const api::Currency DECRED;
extern LIBCORE_EXPORT const api::Currency STAKENET;
};
}
}
Expand Down