expire multi-sig tx fast

don't allow several valid transactions in the wild
This commit is contained in:
Steven Ettinger 2022-11-12 21:19:55 -03:00 committed by GitHub
parent 42efbaec17
commit d320f6c45a
Signed by untrusted user: github
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

8
msa.js
View File

@ -84,7 +84,7 @@ exports.consolidate = (num, plasma, bh, owner) => {
op = {
ref_block_num: bh.block_number & 0xffff,
ref_block_prefix: Buffer.from(bh.block_id, 'hex').readUInt32LE(4),
expiration: new Date(now + 3660000).toISOString().slice(0, -5),
expiration: new Date(now + 300000).toISOString().slice(0, -5),
operations: txs,
extensions: [],
}
@ -119,7 +119,7 @@ exports.osign = (num, type, missed, bh) => {
op = {
ref_block_num: bh.block_number & 0xffff,
ref_block_prefix: Buffer.from(bh.block_id, 'hex').readUInt32LE(4),
expiration: new Date(now + 3660000).toISOString().slice(0, -5),
expiration: new Date(now + 300000).toISOString().slice(0, -5),
operations: obj.length ? [obj] : obj.operations,
extensions: [],
}
@ -158,7 +158,7 @@ exports.sign = (num, plasma, missed, bh) => {
op = {
ref_block_num: bh.block_number & 0xffff,
ref_block_prefix: Buffer.from(bh.block_id, 'hex').readUInt32LE(4),
expiration: new Date(now + 3660000).toISOString().slice(0, -5),
expiration: new Date(now + 300000).toISOString().slice(0, -5),
operations: obj.operations,
extensions: [],
}
@ -269,4 +269,4 @@ exports.updateAccount = (accounts) => {
});
})
}
}