runonbitcoin / run-db

An indexer that crawls the blockchain and calculates RUN states
MIT License
24 stars 22 forks source link

Fix undefined array reference. #6

Closed david0178418 closed 1 year ago

david0178418 commented 3 years ago

Address issue with attempting to access an index of undefined.

I'm not certain if this is indicative of a deeper issue, but since this is looking for truthy-ness, I figured this would be a decent enough patch in either case

image

brentongunning commented 3 years ago

Thanks @david0178418 for the change.

Strange - never seen this before. Do you recall how it happened? It looks like it was crawling blocks normally. Which API were you using?

brentongunning commented 3 years ago

We should avoid the null propagation operator (?) by the way. Works on Node 14+, but we want to keep RUN-DB working on Node 10+ for now.

david0178418 commented 3 years ago

Good call on the v10 compatibility. I'm too spoiled by transpilation.

As for what I was doing at the time, if I recall, I believe it was just default operation with the only the trust list environment variable populated (populated with test class "40a283989272e33fbd2e70f0419a9e03249c5c7ab75c61768fa4206a01429962_o1").

I'm not certain if it could be related, but it seems the current run.db downloadable snapshot has transaction "a42c64f157b1f622cdf441890247b30fe743ab8ed712bd898156eaf1ceec7ed0" which doesn't seem to be a valid one.

image image image