Skip to content

Commit cfe318e

Browse files
committed
Add check before calling ProvisionExpressTickets
1 parent ae5042c commit cfe318e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

rocketpool/node/provision-express-tickets.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,18 @@ func (t *provisionExpress) run(state *state.NetworkState) error {
121121
if err != nil {
122122
return err
123123
}
124-
if !provisioned {
124+
125+
if provisioned {
126+
return nil
127+
}
128+
129+
// GetExpressTicketCount will provide the expected number of express tickets since the node is not provisioned
130+
expressTicketCount, err := node.GetExpressTicketCount(t.rp, nodeAccount.Address, nil)
131+
if err != nil {
132+
return err
133+
}
134+
135+
if expressTicketCount > 0 {
125136
err = t.provisionExpress(nodeAccount.Address)
126137
if err != nil {
127138
return err

0 commit comments

Comments
 (0)