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

ticketvote: Remove testnet linkby path. #1385

Merged
merged 1 commit into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions politeiad/backendv2/tstorebe/plugins/ticketvote/cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,22 +752,13 @@ func (p *ticketVotePlugin) startRunoffForParent(token []byte, s ticketvote.Start
"parent", token),
}
}
isExpired := vm.LinkBy < time.Now().Unix()
isMainNet := p.activeNetParams.Name == chaincfg.MainNetParams().Name
switch {
case !isExpired && isMainNet:
if vm.LinkBy > time.Now().Unix() {
return nil, backend.PluginError{
PluginID: ticketvote.PluginID,
ErrorCode: uint32(ticketvote.ErrorCodeLinkByNotExpired),
ErrorContext: fmt.Sprintf("parent record %x linkby "+
"deadline not met %v", token, vm.LinkBy),
}
case !isExpired:
// Allow the vote to be started before the link by deadline
// expires on testnet and simnet only. This makes testing the
// runoff vote process easier.
log.Warnf("Parent record linkby deadline has not been met; " +
"disregarding deadline since this is not mainnet")
"deadline (%v) has not expired yet", token, vm.LinkBy),
}
}

// Compile a list of the expected submissions that should be in the
Expand Down
2 changes: 1 addition & 1 deletion politeiawww/cmd/pictl/cmdvotetestsetup.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (c *cmdVoteTestSetup) Execute(args []string) error {
return err
}
if policyWWW.PaywallEnabled {
return fmt.Errorf("paywall is not disabled")
fmt.Printf("WARN: politeiawww paywall is not disabled\n")
}

// Setup votes
Expand Down