Comments (2)
I personally would prefer to go further than deprecating them and remove them outright. You've made a great summary of why this needs to happen.
The only questionable one is JSONToNumber since I believe it has some extra range checks that should happen before converting to an int that btcutil.Amount does not do.
I fully agree with the rest however.
from btcjson.
JSONToAmount
checks that the floating point value being converted is no greater than 1.797693134862315708145274237317043567981e+300 and no less than -1.797693134862315708145274237317043567981e+300. It does not perform any checking that the returned int64 is within the total amount of bitcoin producable.
If that check is desired, I can add a function to check that to btcutil, but since that's an application specific requirement (for example, an Amount returned by getreceivedbyaddress may exceed 21e6 * 1e8) I don't think checking that from NewAmount is a good idea. In fact, it used to, but I removed that additonal bounds check for this very reason.
from btcjson.
Related Issues (15)
- getwork api is incorrect
- All concrete result types must satisify the json.Unmarshaler interface. HOT 4
- CreateMessageWithId needs fixing, create/signrawtransaction not correct
- Move getunconfirmedbalance from btcws to here and update HOT 1
- Return value structs should be pointers and consistent. HOT 2
- GetPeerInfoResult pingtime should be a float64 not an int64 HOT 3
- Question about blockchain.info's json-rpc API HOT 9
- Seems listsinceblock not working good. HOT 2
- sendmany HOT 10
- btcjson should include error code consts
- Make Error satisify the error interface
- submitblock support
- add getblocktemplate support HOT 1
- jsonapi.go HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btcjson.