-
Notifications
You must be signed in to change notification settings - Fork 102
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
multi: allow no dcr reg fee config on server, remove dcr-specific fields #2293
Conversation
Fee uint64 `json:"fee"` // DEPRECATED | ||
RegFeeConfirms uint16 `json:"regfeeconfirms"` // DEPRECATED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Released clients will see a Fee
of 0, and block registration (See (*Core).Register
)
Amt: cfg.Fee, | ||
} | ||
} else { | ||
dc.log.Warnf("Server %v does not support DCR for registration", dc.acct.host) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Released clients will warn about this, but it's no longer an issue.
dc.log.Warnf("Legacy server %v does not provide a regFees map.", dc.acct.host) | ||
if cfg.RegFees == nil { | ||
cfg.RegFees = make(map[string]*msgjson.FeeAsset) | ||
} | ||
if cfg.Fee > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release clients will incorrectly refer to this as a "Legacy server" if the server lacks a DCR entry in the map, but the behavior is otherwise fine (block registering with DCR).
if cfg.Fee > 0 && dcrAsset.Amt != cfg.Fee { | ||
dc.log.Warnf("Inconsistent DCR fee amount: %d != %d", dcrAsset.Amt, cfg.Fee) | ||
} | ||
if dcrAsset.Confs != uint32(cfg.RegFeeConfirms) { | ||
dc.log.Warnf("Inconsistent DCR fee confirmation requirement: %d != %d", | ||
dcrAsset.Confs, cfg.RegFeeConfirms) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Released clients will also warn about this because these dcr-specific fields will be zero with a server running the code changes in this PR, but the clients will still use any set DCR values in the RegFees
map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't think of any way to trick old clients into not displaying that, aside from a patch for them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should just upgrade to 0.6 anyways.
If target tier is <= 0, do not spam about the missing bond wallet. The default bond wallet (42/dcr) might not be configured at all. This is mostly for legacy fee clients.
The first commit removes the server's startup requirement of having DCR reg fee info specified. This was a hold-over from before we even had multi-asset reg fee support. There is still the RegFees map (which may also be empty in a bonds-only config).
The second commit removes the warning about a server that does not support DCR for registration. This also removes the handling of ancient servers that even lacked the RegFees map (only had the dcr-specific fields).