Skip to content

Commit

Permalink
Merge pull request #69 from hive-engine/gateNewStreamer
Browse files Browse the repository at this point in the history
gate new streamer behavior on forking block
  • Loading branch information
bt-cryptomancer authored Jul 21, 2021
2 parents c3f1d42 + c70ab9f commit 19d3f51
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions plugins/Streamer.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,23 @@ const parseTransactions = (refBlockNumber, block) => {
sscTransactions = Array.isArray(commentBody.json)
? commentBody.json : [commentBody.json];
} catch (e) {
// If this fails to parse, treat as a comment op
id = `ssc-${chainIdentifier}`;
permlink = operation[1].permlink; // eslint-disable-line prefer-destructuring
sscTransactions = [
{
contractName: 'comments',
contractAction: 'comment',
contractPayload: {
author: operation[1].author,
jsonMetadata: commentMeta,
parentAuthor: operation[1].parent_author,
parentPermlink: operation[1].parent_permlink,
// If this fails to parse, treat as a comment op, only after specified block
if (refBlockNumber >= 54106800) {
id = `ssc-${chainIdentifier}`;
permlink = operation[1].permlink; // eslint-disable-line prefer-destructuring
sscTransactions = [
{
contractName: 'comments',
contractAction: 'comment',
contractPayload: {
author: operation[1].author,
jsonMetadata: commentMeta,
parentAuthor: operation[1].parent_author,
parentPermlink: operation[1].parent_permlink,
},
},
},
];
];
}
}
}
} else if (operation[0] === 'comment_options') {
Expand Down

0 comments on commit 19d3f51

Please sign in to comment.