Comments (7)
I cannot duplicate - the reproduction code works fine for me. What version of algod & go-algorand-sdk are you running?
from go-algorand-sdk.
Algod = 131093 (Update.sh says there is no newer version.)
Cloned the latest master of the sdk.
Go Version is go1.12.5 linux/amd64
Ubuntu 18.04.2 LTS Server
from go-algorand-sdk.
it worked for me as well. I can reproduce either.
from go-algorand-sdk.
Does your local copy have the rewards section: https://github.com/algorand/go-algorand-sdk/blob/master/client/algod/models/models.go#L92
did you clone the repo into your go src dir?
from go-algorand-sdk.
Yes, it's in the src dir and it has the section:
// Account Description
// swagger:model Account
type Account struct {
// Round indicates the round for which this information is relevant
//
// required: true
Round uint64 `json:"round"`
// Address indicates the account public key
//
// required: true
Address string `json:"address"`
// Amount indicates the total number of MicroAlgos in the account
//
// required: true
Amount uint64 `json:"amount"`
// PendingRewards specifies the amount of MicroAlgos of pending
// rewards in this account.
//
// required: true
PendingRewards uint64 `json:"pendingrewards"`
// AmountWithoutPendingRewards specifies the amount of MicroAlgos in
// the account, without the pending rewards.
//
// required: true
AmountWithoutPendingRewards uint64 `json:"amountwithoutpendingrewards"`
// Rewards indicates the total rewards of MicroAlgos the account has recieved
//
// required: true
Rewards uint64 `json:"rewards"`
// Status indicates the delegation status of the account's MicroAlgos
// Offline - indicates that the associated account is delegated.
// Online - indicates that the associated account used as part of the delegation pool.
// NotParticipating - indicates that the associated account is neither a delegator nor a delegate.
//
// required: true
Status string `json:"status"`
}
Strange part is when i try to access it with AccountInfo.Rewards
It trows back the error:
AccountInfo.Rewards undefined (type models.Account has no field or method Rewards)
That is when i checked the models.go and it was there.
I will try it later from a different machine. Let's see if that gives me a better result.
What version of go do you use?
from go-algorand-sdk.
Did it on 2 other machines and it works fine indeed. Can't reproduce it there.
from go-algorand-sdk.
Found the problem and it was me :)
There was an older project i was working on that had his own clone of the sdk.
So there where 2 models.go in the src dir.
Thks for looking into it.
from go-algorand-sdk.
Related Issues (20)
- Fairly confident the test suite has got invalid base64 responseJsons and they are passing because of this line? HOT 6
- Update `MobileWrapper` branch HOT 1
- Breaking changes in v2.0.0
- Add support for "Host" header in custom headers HOT 3
- Remove `future` package
- Breaking changes in v3.0.0
- add Genesis type
- Support /v2/accountdelta/ endpoint
- How to verify signed messages? HOT 1
- Update LedgerStateDelta type
- Cucumber BLOCK test unit.stateproof.responses.msgp does not work properly. HOT 2
- Add smoke test for examples HOT 1
- Fix API Error Wrappers HOT 1
- Reporting a vulnerability HOT 1
- Add golangci-lint to CI process
- Account struct has no definition for 'min-balance' field HOT 1
- Automatically synchronize protocol's with rel/beta
- JSON encoding of maps with non-string key types is invalid HOT 6
- Valid GET parameter of 0 filtered out
- Circular Dependency between go-algorand-sdk and indexer/conduit
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 go-algorand-sdk.