gossamer icon indicating copy to clipboard operation
gossamer copied to clipboard

fix(core): fix txn pool for latest runtime

Open jimjbrettj opened this issue 3 years ago • 6 comments

Changes

Improved txnPool logic and added txn formatting based on txnQueueApiVersion to support the latest runtime.

Tests

go test ./dot/core

Issues

https://github.com/ChainSafe/gossamer/issues/2462

Primary Reviewer

@noot

jimjbrettj avatar Sep 07 '22 22:09 jimjbrettj

@timwu20 https://github.com/ChainSafe/gossamer/pull/2809#discussion_r983858307 so you think good to move this call to just above handleChainReorg? Just wanted to confirm before changing since will need to update tests

jimjbrettj avatar Oct 04 '22 21:10 jimjbrettj

@timwu20 https://github.com/ChainSafe/gossamer/pull/2809#discussion_r983864001 so should I change the function signature to return an error?

jimjbrettj avatar Oct 04 '22 21:10 jimjbrettj

Updated!

jimjbrettj avatar Oct 12 '22 20:10 jimjbrettj

It seems adding panics to handleBlockAsync has caused things to break. WIll further investigate

jimjbrettj avatar Oct 12 '22 21:10 jimjbrettj

@timwu20 I think the core tests should be fixed now. Elizabeth cautioned against having these added panics, but maybe good for testing still? Your call

jimjbrettj avatar Oct 13 '22 20:10 jimjbrettj

  • lib/blocktree/mock_instance_test.go seems like an appropriate name based on its contents, why has it been changed to lib/blocktree/mocks_test.go

    • We want to shut down the node only in case of really critical errors. If the node can continue despite some error, it should.

@kishansagathiya This does indeed make sense since we are dealing with the runtime. However, we are changing the mocks in the code in general to have a mocks_generate_tests file that creates a mocks_test mock file. So even tho that makes sense for this specific case I changed it to keep with the convention used elsewhere in the code

jimjbrettj avatar Oct 18 '22 17:10 jimjbrettj

:tada: This PR is included in version 0.7.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Nov 23 '22 18:11 github-actions[bot]