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 block template #270

Merged
merged 6 commits into from
Dec 9, 2016
Merged

Rpc block template #270

merged 6 commits into from
Dec 9, 2016

Conversation

svyatonik
Copy link
Contributor

@svyatonik svyatonik commented Dec 9, 2016

on top of #267
this commit only: 88b4f1a

just to discuss RPC BlockTemplate struct fields - are these enough? or am I missed some? maybe wrong types? there are too many info on this structure - I've got most of structure from here:
https://github.com/bitcoin/bitcoin/blob/master/src/rpc/mining.cpp#L346

mode: None,
capabilities: None,
rules: None,
}).unwrap(), r#"{"mode":null,"capabilities":null,"rules":null}"#);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a standard way to not to serialize field at all if its value is None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I expected that serialized value would be just {}

/// Difference in value between transaction inputs and outputs (in Satoshis).
/// For coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy).
/// If key is not present, fee is unknown and clients MUST NOT assume there isn't one
pub fee: Option<Option<i64>>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Option<Option<>> - will fix this :)

@debris debris merged commit da80c69 into master Dec 9, 2016
@debris debris deleted the rpc_block_template branch December 9, 2016 13:22
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.

2 participants