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

rpc: fix marshalling of type-specific tx data #789

Merged
merged 2 commits into from
Mar 30, 2020

Conversation

AnnaShaleva
Copy link
Member

closes #585

@AnnaShaleva AnnaShaleva added bug Something isn't working rpc RPC server and client labels Mar 24, 2020
@AnnaShaleva AnnaShaleva added this to the v0.74.1 milestone Mar 24, 2020
@AnnaShaleva AnnaShaleva self-assigned this Mar 24, 2020
@codecov
Copy link

codecov bot commented Mar 24, 2020

Codecov Report

Merging #789 into master will increase coverage by 0.18%.
The diff coverage is 55.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #789      +/-   ##
==========================================
+ Coverage    66.8%   66.98%   +0.18%     
==========================================
  Files         141      141              
  Lines       12980    13164     +184     
==========================================
+ Hits         8671     8818     +147     
- Misses       3899     3930      +31     
- Partials      410      416       +6
Impacted Files Coverage Δ
pkg/core/transaction/publish.go 89.65% <ø> (+6.89%) ⬆️
pkg/core/transaction/register.go 100% <ø> (ø) ⬆️
pkg/rpc/response/result/block.go 0% <0%> (ø) ⬆️
pkg/rpc/response/result/tx_raw_output.go 0% <0%> (ø) ⬆️
pkg/rpc/client/rpc.go 85.54% <100%> (ø) ⬆️
pkg/core/transaction/state_descriptor.go 81.25% <72.72%> (-18.75%) ⬇️
pkg/core/transaction/transaction.go 72.85% <89.18%> (+16.48%) ⬆️
pkg/rpc/server/server.go 81.07% <0%> (+0.3%) ⬆️
pkg/core/transaction/type.go 70.49% <0%> (+45.9%) ⬆️

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 c738975...9c09ad9. Read the comment docs.

@AnnaShaleva AnnaShaleva force-pushed the fix/tx_specific_data_marshalling branch 5 times, most recently from ab1cc6f to adf370a Compare March 27, 2020 13:01
Fixed double-pointer bug in following methods:
	- GetRawTransactionVerbose
	- GetBlockVerbose
	- GetBlockHeader
	- GetTxOut
	- ValidateAddress
@AnnaShaleva AnnaShaleva force-pushed the fix/tx_specific_data_marshalling branch from adf370a to 3e27eeb Compare March 27, 2020 13:06
@AnnaShaleva AnnaShaleva marked this pull request as ready for review March 27, 2020 13:18
pkg/core/transaction/transaction.go Outdated Show resolved Hide resolved
pkg/core/transaction/transaction.go Outdated Show resolved Hide resolved
pkg/core/transaction/transaction.go Outdated Show resolved Hide resolved
pkg/core/transaction/transaction.go Outdated Show resolved Hide resolved
pkg/rpc/client/rpc_test.go Outdated Show resolved Hide resolved
NetFee util.Fixed8 `json:"net_fee"`

Nonce uint32 `json:"nonce,omitempty"`
Transaction *transaction.Transaction
Copy link
Member

Choose a reason for hiding this comment

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

Not sure it's a good change, we're missing original TxID and Size field, although it's possible to get them via other means. @im-kulikov: are you using any of these fields directly?

pkg/rpc/response/result/block.go Outdated Show resolved Hide resolved
pkg/rpc/response/result/tx_raw_output.go Outdated Show resolved Hide resolved
pkg/rpc/response/result/tx_raw_output.go Outdated Show resolved Hide resolved
pkg/rpc/response/result/tx_raw_output.go Outdated Show resolved Hide resolved
@AnnaShaleva AnnaShaleva force-pushed the fix/tx_specific_data_marshalling branch 3 times, most recently from 3db2ba3 to 871b181 Compare March 30, 2020 10:18
@AnnaShaleva AnnaShaleva changed the title rpc: fix marshalling of type-cpecific tx data rpc: fix marshalling of type-specific tx data Mar 30, 2020
pkg/core/transaction/transaction.go Outdated Show resolved Hide resolved
pkg/rpc/client/rpc_test.go Outdated Show resolved Hide resolved
pkg/rpc/response/result/block.go Outdated Show resolved Hide resolved
@AnnaShaleva AnnaShaleva force-pushed the fix/tx_specific_data_marshalling branch from 871b181 to 9c09ad9 Compare March 30, 2020 12:49
@roman-khimov roman-khimov merged commit e41853d into master Mar 30, 2020
@roman-khimov roman-khimov deleted the fix/tx_specific_data_marshalling branch March 30, 2020 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rpc RPC server and client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return claim-specific data in getrawtransaction RPC
2 participants