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

In RPC, use RPCTransactions and RPCBlocks instead of TransactionMessages and BlockMessages #1609

Merged
merged 26 commits into from
Mar 30, 2021

Conversation

stasatdaglabs
Copy link
Collaborator

This implements #1247

@codecov
Copy link

codecov bot commented Mar 14, 2021

Codecov Report

Merging #1609 (ffb1666) into v0.10.0-dev (9266d17) will decrease coverage by 0.09%.
The diff coverage is 64.51%.

❗ Current head ffb1666 differs from pull request most recent head bcd42b6. Consider uploading reports for the commit bcd42b6 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##           v0.10.0-dev    #1609      +/-   ##
===============================================
- Coverage        60.41%   60.32%   -0.10%     
===============================================
  Files              533      533              
  Lines            20687    20702      +15     
===============================================
- Hits             12499    12489      -10     
- Misses            6233     6255      +22     
- Partials          1955     1958       +3     
Impacted Files Coverage Δ
app/appmessage/rpc_get_block.go 0.00% <ø> (ø)
app/appmessage/rpc_submit_block.go 83.33% <ø> (ø)
app/appmessage/rpc_submit_transaction.go 100.00% <ø> (ø)
app/rpc/rpchandlers/get_block.go 0.00% <0.00%> (ø)
app/rpc/rpchandlers/get_mempool_entries.go 0.00% <0.00%> (ø)
cmd/kaspaminer/mineloop.go 0.00% <0.00%> (ø)
cmd/kaspaminer/templatemanager/templatemanager.go 0.00% <0.00%> (ø)
...apter/server/grpcserver/protowire/rpc_get_block.go 0.00% <0.00%> (-59.90%) ⬇️
...pter/server/grpcserver/protowire/rpc_get_blocks.go 0.00% <0.00%> (ø)
infrastructure/network/rpcclient/rpc_get_blocks.go 0.00% <0.00%> (ø)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9266d17...bcd42b6. Read the comment docs.

}
}

// RPCBlockToDomainBlock converts RPCBlocks to DomainBlocks
Copy link
Collaborator

Choose a reason for hiding this comment

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

RPCBlocks -> RPCBlock, DomainBlocks -> DomainBlock

Hash: blockHash.String(),
Difficulty: ctx.GetDifficultyRatio(domainBlockHeader.Bits(), ctx.Config.ActiveNetParams),
ChildrenHashes: hashes.ToStrings(childrenHashes),
SelectedParentHash: "", // TODO
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add it

@someone235 someone235 merged commit c5b0394 into v0.10.0-dev Mar 30, 2021
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