Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ctxc client test #669

Merged
merged 7 commits into from Aug 13, 2020
Merged

add ctxc client test #669

merged 7 commits into from Aug 13, 2020

Conversation

DhunterAO
Copy link
Contributor

No description provided.

@DhunterAO DhunterAO marked this pull request as ready for review July 9, 2020 06:31
@ucwong ucwong requested review from ucwong and ShadowErii July 9, 2020 06:32
1. Check the exitCh before close it.
2. Adjust the Unmarshal function of Supply in Header.
3. It's nonetheless ugly to spin up a blockchain in GenerateChain. Get rid of it.
@codecov
Copy link

codecov bot commented Jul 10, 2020

Codecov Report

Merging #669 into master will decrease coverage by 0.01%.
The diff coverage is 21.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #669      +/-   ##
==========================================
- Coverage   50.85%   50.84%   -0.02%     
==========================================
  Files         408      408              
  Lines       51908    51922      +14     
==========================================
+ Hits        26399    26400       +1     
- Misses      23478    23492      +14     
+ Partials     2031     2030       -1     
Impacted Files Coverage Δ
consensus/cuckoo/cuckoo.go 31.57% <0.00%> (-4.60%) ⬇️
consensus/cuckoo/cuckoo_faker.go 0.00% <0.00%> (ø)
core/types/block.go 25.00% <0.00%> (-0.61%) ⬇️
core/types/gen_header_json.go 0.00% <0.00%> (ø)
ctxc/api_backend.go 0.00% <0.00%> (ø)
core/chain_makers.go 52.54% <46.15%> (-2.42%) ⬇️
consensus/cuckoo/sealer.go 0.00% <0.00%> (-6.76%) ⬇️
trie/sync_bloom.go 60.52% <0.00%> (-5.27%) ⬇️
ctxc/downloader/statesync.go 63.77% <0.00%> (-3.94%) ⬇️
... and 14 more

@@ -232,7 +232,9 @@ func (cuckoo *Cuckoo) InitOnce() error {

// Close closes the exit channel to notify all backend threads exiting.
func (cuckoo *Cuckoo) Close() error {
close(cuckoo.exitCh)
if cuckoo.exitCh != nil {
close(cuckoo.exitCh)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can cuckoo.exitCh be nil here ?

stateDb, err := b.ctxc.BlockChain().StateAt(header.Root)
fmt.Println("StateAndHeaderByNumber error: ", err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Print if err not nil

@ucwong ucwong merged commit 8246ddd into master Aug 13, 2020
@wlt-cortex wlt-cortex deleted the clientTest branch January 7, 2022 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants