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

fix: sync issues with devnet and mainnet #2565

Merged
merged 4 commits into from May 13, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -179,8 +179,8 @@ describe("Block", () => {
},
reward: Utils.BigNumber.make(0),
};
const transactions = TransactionFactory.transfer("DB4gFuDztmdGALMb8i1U4Z4R5SktxpNTAY", 10)
.withNetwork("devnet")
const transactions = TransactionFactory.transfer("ANYiQJSPSoDT8U9Quh5vU8timD2RM7RS38", 10)
.withNetwork("testnet")
.withPassphrase("super cool passphrase")
.create();

@@ -440,21 +440,6 @@ describe("Block", () => {
"30440220543f71d6f6445b703459b4f91d2c6f2446cbe6669e9c9008b1c77cc57073af2402206036fee3b434ffd5a31a579dd5b514a1c6384962291fda27b2463de903422834",
id: "11773170219525190460",
transactions: [
{
type: 3,
network: 0x17,
timestamp: 25028325,
senderPublicKey: "02aadc3e0993c1d3447db27741745eb9c2c6522cccf02fc8efe3bf2d49708243dd",
fee: Utils.BigNumber.make(100000000),
amount: Utils.BigNumber.make(0),
asset: {
votes: ["+020431436cf94f3c6a6ba566fe9e42678db8486590c732ca6c3803a10a86f50b92"],
},
signature:
"3045022100be28bdd7dc7117de903eccf97e3afbe87e1a32ee25b0b9bf814b35c6773ed51802202c8d62e708aa7afc08dbfcfd4640d105fe97337fb6145a8d916f2ce11c920255",
recipientId: "ANYiQJSPSoDT8U9Quh5vU8timD2RM7RS38",
id: "bace38ea544678f951cdd4abc269be24b4f5bab925ff6d5b480657952eb5aa65",
},
{
id: "7a1a43098cd253db395514220f69e3b99afaabb2bfcf5ecfa3b99727b367344b",
network: 0x17,
@@ -471,6 +456,21 @@ describe("Block", () => {
},
},
},
{
type: 3,
network: 0x17,
timestamp: 25028325,
senderPublicKey: "02aadc3e0993c1d3447db27741745eb9c2c6522cccf02fc8efe3bf2d49708243dd",
fee: Utils.BigNumber.make(100000000),
amount: Utils.BigNumber.make(0),
asset: {
votes: ["+020431436cf94f3c6a6ba566fe9e42678db8486590c732ca6c3803a10a86f50b92"],
},
signature:
"3045022100be28bdd7dc7117de903eccf97e3afbe87e1a32ee25b0b9bf814b35c6773ed51802202c8d62e708aa7afc08dbfcfd4640d105fe97337fb6145a8d916f2ce11c920255",
recipientId: "ANYiQJSPSoDT8U9Quh5vU8timD2RM7RS38",
id: "bace38ea544678f951cdd4abc269be24b4f5bab925ff6d5b480657952eb5aa65",
},
],
};

@@ -56,6 +56,7 @@ export class Config {
transactions: Joi.array().items(Joi.string()),
outlookTable: Joi.object(),
transactionIdFixTable: Joi.object(),
wrongTransactionOrder: Joi.object(),
}).default({
exceptions: {},
}),
@@ -199,7 +199,12 @@ export class Block implements IBlock {
}

if (transaction.data.expiration > 0 && transaction.data.expiration <= this.data.height) {
result.errors.push(`Encountered expired transaction: ${transaction.data.id}`);
const isException =
configManager.get("network.name") === "devnet" &&
configManager.getMilestone().ignoreExpiredTransactions;
if (!isException) {
result.errors.push(`Encountered expired transaction: ${transaction.data.id}`);
}
}

appliedTransactions[transaction.data.id] = transaction.data;
@@ -24,6 +24,7 @@
}
},
"ignoreInvalidSecondSignatureField": true,
"ignoreExpiredTransactions": true,
"vendorFieldLength": 64
},
{
@@ -57,5 +58,9 @@
"block": {
"idFullSha256": true
}
},
{
"height": 2300000,
"ignoreExpiredTransactions": false
}
]
@@ -92,12 +92,12 @@
},
"wrongTransactionOrder": {
"11773170219525190460": [
"7a1a43098cd253db395514220f69e3b99afaabb2bfcf5ecfa3b99727b367344b",
"bace38ea544678f951cdd4abc269be24b4f5bab925ff6d5b480657952eb5aa65"
"bace38ea544678f951cdd4abc269be24b4f5bab925ff6d5b480657952eb5aa65",
"7a1a43098cd253db395514220f69e3b99afaabb2bfcf5ecfa3b99727b367344b"
],
"5847703302374058501": [
"ce3b901c5507993a282c36987cbf003769e962d721b70a9f550b9ac1654fcee7",
"163c355844ced31ea62c86aeba033a1ba75f8a9657729990e17b06cbdf31f68a"
"163c355844ced31ea62c86aeba033a1ba75f8a9657729990e17b06cbdf31f68a",
"ce3b901c5507993a282c36987cbf003769e962d721b70a9f550b9ac1654fcee7"
]
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.