Git Product home page Git Product logo

kaspa-db-filler's Issues

KeyError: 'transactions'

2023-05-26 08:45:32,555::DEBUG::TxAddrMappingUpdater::Start TxAddrMappingUpdater
2023-05-26 08:45:32,593::DEBUG::kaspad.KaspadClient::Request end
2023-05-26 08:45:32,612::INFO::main::Start hash: 21b82b0b2c04a24c53674497d4fe11278133a9757e42757c5c7dbc592b859b5a
2023-05-26 08:45:32,612::DEBUG::kaspad.KaspadClient::Request start: getBlocksRequest, {'lowHash': '21b82b0b2c04a24c53674497d4fe11278133a9757e42757c5c7dbc592b859b5a', 'includeTransactions': True, 'includeBlocks': True}
2023-05-26 08:45:32,772::DEBUG::kaspad.KaspadClient::Request end
2023-05-26 08:45:32,772::DEBUG::kaspad.KaspadClient::Request start: getBlockDagInfoRequest, {}
2023-05-26 08:45:32,776::DEBUG::kaspad.KaspadClient::Request end
2023-05-26 08:45:32,776::ERROR::main::Exception occured and script crashed..
Traceback (most recent call last):
File "/app/main.py", line 119, in
asyncio.run(main())
File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/app/main.py", line 87, in main
await bp.loop(start_hash)
File "/app/BlocksProcessor.py", line 43, in loop
await self.__add_tx_to_queue(block_hash, block)
File "/app/BlocksProcessor.py", line 101, in __add_tx_to_queue
for transaction in block["transactions"]:
KeyError: 'transactions'

blockhash: 21b82b0b2c04a24c53674497d4fe11278133a9757e42757c5c7dbc592b859b5a
image
The requested data is returned null

Update Block.is_chain_block from VirtualChainProcessor

I believe VirtualChainProcessor should update Block.is_chain_block accordingly while processing getVirtualSelectedParentChainFromBlockResponse:

  • Set Block.is_chain_block to False for all blocks in removedChainBlockHashes
  • Set Block.is_chain_block to True for all blocks in addedChainBlockHashes

If this makes sense then I am happy to PR it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.