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

[rpcwallet] Don't use floating point #8317

Merged
merged 1 commit into from Jul 11, 2016

Conversation

Projects
None yet
3 participants
@MarcoFalke
Member

MarcoFalke commented Jul 8, 2016

Follow up of 69d605f

fun fact:
The refactor in getreceivedbyaddress actually removes the feature to detect if IsMine() was false. You can check getreceivedbyaddress == 0 and isfloat(getreceivedbyaddress)

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Jul 8, 2016

Member

Before:

> getreceivedbyaddress $notMineAddress
< 0
> getreceivedbyaccount none
< 0
> getreceivedbyaccount t2 0
< 1.111e-05

After:

> getreceivedbyaddress $notMineAddress
< 0.00000000
> getreceivedbyaccount none
< 0.00000000
> getreceivedbyaccount t2 0
< 0.00001111
Member

MarcoFalke commented Jul 8, 2016

Before:

> getreceivedbyaddress $notMineAddress
< 0
> getreceivedbyaccount none
< 0
> getreceivedbyaccount t2 0
< 1.111e-05

After:

> getreceivedbyaddress $notMineAddress
< 0.00000000
> getreceivedbyaccount none
< 0.00000000
> getreceivedbyaccount t2 0
< 0.00001111
@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Jul 8, 2016

Member

Concept ACK.
What's the raw JSON differences? Is this a tiny API change?

Member

jonasschnelli commented Jul 8, 2016

Concept ACK.
What's the raw JSON differences? Is this a tiny API change?

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Jul 8, 2016

Member

What's the raw JSON differences? Is this a tiny API change?

yes, it is two different functions to generate the string. Before it used setFloat and oss << std::setprecision(16) << val;. After, it uses our wrapper function.

Member

MarcoFalke commented Jul 8, 2016

What's the raw JSON differences? Is this a tiny API change?

yes, it is two different functions to generate the string. Before it used setFloat and oss << std::setprecision(16) << val;. After, it uses our wrapper function.

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Jul 8, 2016

Member

I think we should do this (for 0.14) but would require a short part in the release notes.

Member

jonasschnelli commented Jul 8, 2016

I think we should do this (for 0.14) but would require a short part in the release notes.

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jul 8, 2016

Member

utACK.

The numbers may be formatted slightly differently, but it's not an API change from the perspective of a client, it still returns a JSON number where a JSON number was returned. No need to mention this in release notes.

Member

laanwj commented Jul 8, 2016

utACK.

The numbers may be formatted slightly differently, but it's not an API change from the perspective of a client, it still returns a JSON number where a JSON number was returned. No need to mention this in release notes.

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Jul 8, 2016

Member

release notes

What would I write there?
Let's hope no implementation relies on some numbers being represented by scientific notation. Also note that getreceivedbyaddress (and all other calls) already use ValueFromAmount.

Member

MarcoFalke commented Jul 8, 2016

release notes

What would I write there?
Let's hope no implementation relies on some numbers being represented by scientific notation. Also note that getreceivedbyaddress (and all other calls) already use ValueFromAmount.

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Jul 8, 2016

Member

[...] No need to mention this in release notes.

Okay for me.
utACK 477777f

Member

jonasschnelli commented Jul 8, 2016

[...] No need to mention this in release notes.

Okay for me.
utACK 477777f

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jul 8, 2016

Member

Okay for me.

I think we should be careful to not add too much technical details to the explicit descriptions in the release notes. The release notes are already huge, every major release.

Also remember that every commit/PR already gets a mention with the title.

Member

laanwj commented Jul 8, 2016

Okay for me.

I think we should be careful to not add too much technical details to the explicit descriptions in the release notes. The release notes are already huge, every major release.

Also remember that every commit/PR already gets a mention with the title.

@laanwj laanwj merged commit 477777f into bitcoin:master Jul 11, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Jul 11, 2016

Merge #8317: [rpcwallet] Don't use floating point
477777f [rpcwallet] Don't use floating point (MarcoFalke)

@MarcoFalke MarcoFalke deleted the MarcoFalke:Mf1607-rpcFloat branch Jul 11, 2016

@MarcoFalke MarcoFalke added this to the 0.12.2 milestone Aug 26, 2016

MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Nov 23, 2016

@dgenr8 dgenr8 referenced this pull request Jan 8, 2017

Merged

Cherries #184

UdjinM6 added a commit to UdjinM6/dash that referenced this pull request Mar 22, 2017

Don't use floating point
Github-Pull: #8317
Rebased-From: 477777f

UdjinM6 added a commit to UdjinM6/dash that referenced this pull request Mar 22, 2017

Don't use floating point
Github-Pull: #8317
Rebased-From: 477777f

UdjinM6 added a commit to dashpay/dash that referenced this pull request Apr 11, 2017

Align with btc 0.12 (#1409)
* Implement BIP 9 GBT changes

- BIP9DeploymentInfo struct for static deployment info
- VersionBitsDeploymentInfo: Avoid C++11ism by commenting parameter names
- getblocktemplate: Make sure to set deployments in the version if it is LOCKED_IN
- In this commit, all rules are considered required for clients to support

* qa/rpc-tests: bip9-softforks: Add tests for getblocktemplate versionbits updates

* getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not

* getblocktemplate: Use version/force mutation to support pre-BIP9 clients

* Don't use floating point

Github-Pull: #8317
Rebased-From: 477777f

* Send tip change notification from invalidateblock

This change is needed to prevent sync_blocks timeouts in the mempool_reorg
test after the sync_blocks update in the upcoming commit
"[qa] Change sync_blocks to pick smarter maxheight".

This change was initially suggested by Suhas Daftuar <sdaftuar@chaincode.com>
in bitcoin#8680 (comment)

Github-Pull: #9196
Rebased-From: 67c6326

* torcontrol: Explicitly request RSA1024 private key

When generating a new service key, explicitly request a RSA1024 one.

The bitcoin P2P protocol has no support for the longer hidden service names
that will come with ed25519 keys, until it does, we depend on the old
hidden service type so make this explicit.

See #9214.

Github-Pull: #9234
Rebased-From: 7d3b627

* Bugfix: FRT: don't terminate when keypool is empty

Github-Pull: #9295
Rebased-From: c24a4f5

* add fundrawtransaction test on a locked wallet with empty keypool

Github-Pull: #9295
Rebased-From: 1a6eacb

thokon00 added a commit to faircoin/faircoin that referenced this pull request Apr 17, 2018

[rpcwallet] Don't use floating point
Github-Pull: #8317
Rebased-From: 477777f

santiky added a commit to Punto0/faircoin2 that referenced this pull request Apr 18, 2018

[rpcwallet] Don't use floating point
Github-Pull: #8317
Rebased-From: 477777f

@str4d str4d referenced this pull request Apr 23, 2018

Merged

Bech32 encoding support #3202

zkbot added a commit to zcash/zcash that referenced this pull request Apr 23, 2018

Auto merge of #3202 - str4d:3058-sapling-bech32, r=<try>
Bech32 encoding support and t-addr encoding refactor

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7922
- bitcoin/bitcoin#7825
- bitcoin/bitcoin#8317
- bitcoin/bitcoin#9804
  - Only the commit that changed `base58.cpp`
- bitcoin/bitcoin#11117
- bitcoin/bitcoin#11259
- bitcoin/bitcoin#11167
  - Only the first three commits (the fourth commit depends on #2390, later ones are SegWit-specific).

Part of #3058.

zkbot added a commit to zcash/zcash that referenced this pull request Apr 24, 2018

Auto merge of #3202 - str4d:3058-sapling-bech32, r=<try>
Bech32 encoding support and t-addr encoding refactor

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7922
- bitcoin/bitcoin#7825
- bitcoin/bitcoin#8317
- bitcoin/bitcoin#9804
  - Only the commit that changed `base58.cpp`
- bitcoin/bitcoin#11117
- bitcoin/bitcoin#11259
- bitcoin/bitcoin#11167
  - Only the first three commits (the fourth commit depends on #2390, later ones are SegWit-specific).
- bitcoin/bitcoin#8578
- bitcoin/bitcoin#11372
  - Only the first commit (the rest block on refactoring to remove `CZCEncoding`)

Part of #3058.

zkbot added a commit to zcash/zcash that referenced this pull request Apr 25, 2018

Auto merge of #3202 - str4d:3058-sapling-bech32, r=<try>
Bech32 encoding support and t-addr encoding refactor

Includes code cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7922
- bitcoin/bitcoin#7825
- bitcoin/bitcoin#8317
- bitcoin/bitcoin#9804
  - Only the commit that changed `base58.cpp`
- bitcoin/bitcoin#11117
- bitcoin/bitcoin#11259
- bitcoin/bitcoin#11167
  - Only the first three commits (the fourth commit depends on #2390, later ones are SegWit-specific).
- bitcoin/bitcoin#8578
- bitcoin/bitcoin#11372
  - Only the first three commits (the fourth commit depends on #2390)

Part of #3058.

zkbot added a commit to zcash/zcash that referenced this pull request Apr 25, 2018

Auto merge of #3202 - str4d:3058-sapling-bech32, r=<try>
Bech32 encoding support and address encoding refactor

Includes code cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7922
- bitcoin/bitcoin#7825
- bitcoin/bitcoin#8317
- bitcoin/bitcoin#9804
  - Only the commit that changed `base58.cpp`
- bitcoin/bitcoin#11117
- bitcoin/bitcoin#11259
- bitcoin/bitcoin#11167
  - Only the first three commits (the fourth commit depends on #2390, later ones are SegWit-specific).
- bitcoin/bitcoin#8578
- bitcoin/bitcoin#11372
  - Only the first three commits (the fourth commit depends on #2390)

Part of #3058.

@str4d str4d referenced this pull request Apr 26, 2018

Merged

Upstream encoding cleanups #3213

zkbot added a commit to zcash/zcash that referenced this pull request May 1, 2018

Auto merge of #3213 - str4d:3202-precursor, r=<try>
Upstream encoding cleanups

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7922
- bitcoin/bitcoin#7825
- bitcoin/bitcoin#8317
- bitcoin/bitcoin#9804
  - Only the commit that changed `base58.cpp`

Precursor to #3202.

zkbot added a commit to zcash/zcash that referenced this pull request May 1, 2018

Auto merge of #3213 - str4d:3202-precursor, r=<try>
Upstream encoding cleanups

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7922
- bitcoin/bitcoin#7825
- bitcoin/bitcoin#8317
- bitcoin/bitcoin#9804
  - Only the commit that changed `base58.cpp`

Precursor to #3202.

zkbot added a commit to zcash/zcash that referenced this pull request May 1, 2018

Auto merge of #3213 - str4d:3202-precursor, r=str4d
Upstream encoding cleanups

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7922
- bitcoin/bitcoin#7825
- bitcoin/bitcoin#8317
- bitcoin/bitcoin#9804
  - Only the commit that changed `base58.cpp`

Precursor to #3202.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment