The escrow wizard sends the typed-back words to the box; the new package reaches the hub only when they match (R-1151 controller half, unreleased; works with every agent)
gates / gates (push) Successful in 47s
gates / gates (push) Successful in 47s
This commit is contained in:
@@ -35,7 +35,13 @@ type fakeEscrowAgent struct {
|
||||
claimCode string
|
||||
claimStatus int
|
||||
claimErr error
|
||||
pf agentapi.EscrowPreflightResponse
|
||||
// R-1151: an agent ≥ 0.160.0 answers the claim with a confirm request; confirmStatus/confirmErr answer the confirm.
|
||||
claimConfirm bool
|
||||
claimPos []int
|
||||
confirmWords []string
|
||||
confirmStatus int
|
||||
confirmErr error
|
||||
pf agentapi.EscrowPreflightResponse
|
||||
}
|
||||
|
||||
func (f *fakeEscrowAgent) EscrowPreflight(context.Context) (agentapi.EscrowPreflightResponse, error) {
|
||||
@@ -49,9 +55,14 @@ func (f *fakeEscrowAgent) EscrowCeremonyStart(context.Context) (agentapi.EscrowC
|
||||
func (f *fakeEscrowAgent) EscrowCeremonyStatus(context.Context) (agentapi.EscrowCeremonyStatusResponse, error) {
|
||||
return f.status, nil
|
||||
}
|
||||
func (f *fakeEscrowAgent) EscrowCeremonyClaim(context.Context) (string, int, error) {
|
||||
func (f *fakeEscrowAgent) EscrowCeremonyClaim(context.Context) (agentapi.EscrowClaim, int, error) {
|
||||
*f.order = append(*f.order, "claim")
|
||||
return f.claimCode, f.claimStatus, f.claimErr
|
||||
return agentapi.EscrowClaim{Code: f.claimCode, ConfirmRequired: f.claimConfirm, Positions: f.claimPos}, f.claimStatus, f.claimErr
|
||||
}
|
||||
func (f *fakeEscrowAgent) EscrowCeremonyConfirm(_ context.Context, words []string) (int, error) {
|
||||
*f.order = append(*f.order, "confirm")
|
||||
f.confirmWords = append([]string(nil), words...)
|
||||
return f.confirmStatus, f.confirmErr
|
||||
}
|
||||
func (f *fakeEscrowAgent) AgentVersion() string { return f.version }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user