Skip to content

Commit

Permalink
enable UIA feature after 1700000
Browse files Browse the repository at this point in the history
  • Loading branch information
sqfasd committed Feb 26, 2017
1 parent 1ff176d commit 647b66c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ Blocks.prototype.loadBlocksOffset = function (limit, offset, verify, cb) {
Blocks.prototype.setLastBlock = function (block) {
private.lastBlock = block
if (global.Config.netVersion === 'mainnet') {
global.featureSwitch.enableLongId = private.lastBlock.height >= 1700000
global.featureSwitch.enableUIA = global.featureSwitch.enableLongId = private.lastBlock.height >= 1700000
} else if (global.Config.netVersion === 'testnet') {
global.featureSwitch.enableLongId = private.lastBlock.height >= 4000
} else {
Expand Down
3 changes: 3 additions & 0 deletions src/core/transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ Transactions.prototype.processUnconfirmedTransaction = function (transaction, br
if (!transaction.id) {
transaction.id = library.base.transaction.getId(transaction);
}
if (!global.featureSwitch.enableUIA && transaction.type >= 8) {
return cb("Feature not activated");
}
// Check transaction indexes
if (private.unconfirmedTransactionsIdIndex[transaction.id] !== undefined) {
return cb("Transaction " + transaction.id + " already exists, ignoring...");
Expand Down

0 comments on commit 647b66c

Please sign in to comment.