Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Block replace - invalid flow

See original GitHub issue


I work on my own naive implementation and I study yours. I think I have found some invalid flow. In chain implementation you do following:

  1. replaceChain(newChain) you call checkChain
  2. it calls checkBlock
  3. it calls checkTransaction
  4. this check if transaction isn’t already in your chain here

Problem with it is that you check this way whole new chain, not only new blocks as you do slice after the check here

This way any try to check chain that contains shared transaction history with your chain will be invalid. Or I don’t understand something.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

conradoqgcommented, Jan 9, 2018


I think it was easy to do that way, indeed, only checking from the shared parent forward is valid and has more performance.

In some extreme cases, it’s possible that a new blockchain totally replaces the current one, but even in that case, the only change is that we check the genesis and forward. (and the genesis becomes the shared parent).


conradoqgcommented, Jan 24, 2018

Agree. Thanks for your help. I’ll keep this improvement in mind and I’ll add it to a list of desired improvements.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Please help! Invalid template - cannot be evaluate...
It appears that this is due to the converting of a string to number (float integer) is failing. The fact that it's in...
Read more >
Repair an invalid flow - Okta Documentation
Repair an invalid flow. You cannot save a flow with an invalid structure. Three typical causes of invalid flows are: Missing required inputs....
Read more >
Invalid Flow Error - OutSystems 11 Documentation
Edit your flow and connect the element to one of the existing elements, otherwise that element won't be executed. Incoming connector error ...
Read more >
Remove unwanted characters from a string in Power Automate
This blog post explains how to remove unwanted characters from a string in a Power Automate flow. These can be regular characters or ......
Read more >
Trouble using 'blockreplace' command - AutoCAD General
I'm having trouble using the blockreplace' command. Every time I try it tells me the block name has invalid characters.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found