Skip to content

Commit

Permalink
Fix WLinkNet's bug and roll back. 🖕 @attacker, I will move on to anot…
Browse files Browse the repository at this point in the history
…her project.
  • Loading branch information
mr-pandabear committed Oct 17, 2023
1 parent 6d04369 commit b29e01c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/core/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ json getConfig(int argc, char**argv) {
checkpoints.push_back({300000, "E43270C33F6A029E6104CC2A3A6E59FA55B6C42B49EAF8DA35CD36D082290645"});
checkpoints.push_back({350000, "564A807B18A9C36275E0BCC2478A94005CE53C9E7C160929B2941E0235B50097"});
checkpoints.push_back({599316, "CDD5E9B25CCD7BFB6A4ED2D5097F2BFD94B8445974E12034CE62984597F09272"});
bannedHashes.push_back({143799,"60D84E0D3078F3FFD9E54133B450448F3F12B671028B0431F775A37A347FFACA"});
checkpoints.push_back({614893, "44845E4ADEAAA74A91E6829F7DBDD52EF0A3A084BE194236F84B5EA4D1E22F4D"});
bannedHashes.push_back({614894,"2419D3F475449AD3A0DFC050DE01BDC72635D08377C24EC049661B8493D55C31"});
}

it = std::find(args.begin(), args.end(), "--disable-limiter");
Expand Down
2 changes: 1 addition & 1 deletion src/server/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define FORK_RESET_RETRIES 25
#define MAX_DISCONNECTS_BEFORE_RESET 15
#define FAILURES_BEFORE_POP_ATTEMPT 1
constexpr size_t NO_VALIDITY_CHECK_BEFORE_HEIGHT=599700;
constexpr size_t NO_VALIDITY_CHECK_BEFORE_HEIGHT=614894;

using namespace std;

Expand Down
13 changes: 2 additions & 11 deletions src/server/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,25 +220,16 @@ ExecutionStatus updateLedger(Transaction t, PublicWalletAddress& miner, Ledger&
total -= amt;

if (checkInvalid && total < fees) {
if (!isInvalidTransaction(blockId, from) && blockId != 0) {
addInvalidTransaction(blockId, from);
return BALANCE_TOO_LOW;
}
return BALANCE_TOO_LOW;
}
if (!withdraw(from, amt, ledger, deltas)) {
if (!isInvalidTransaction(blockId, from) && blockId != 0) {
addInvalidTransaction(blockId, from);
return BALANCE_TOO_LOW;
}
return BALANCE_TOO_LOW;
}
deposit(to, amt, ledger, deltas);
if (fees > 0) {
if (!withdraw(from, fees, ledger, deltas)) {
if (!isInvalidTransaction(blockId, from) && blockId != 0) {
addInvalidTransaction(blockId, from);
return BALANCE_TOO_LOW;
}
}
deposit(miner, fees, ledger, deltas);
}
}
Expand Down

0 comments on commit b29e01c

Please sign in to comment.