From b90d3a4556085b134c030838d0c2999f3f5ce601 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 11 Nov 2026 21:26:20 +0100 Subject: [PATCH] The delivery gate names the ledger's fill answer as the sdk has it: buscalls.Fill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sdk (02bea66) answers the ledger's fill call as one buscalls.Fill; the gate's LedgerFilled is a name that is gone. Builds: design 47 G ยง462 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ --- .../cmd/mesh-delivery-gate/record_test.go | 10 +++++----- .../cmd/mesh-delivery-gate/recordfill.go | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record_test.go b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record_test.go index 9d72a2777..a5d091560 100644 --- a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record_test.go +++ b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record_test.go @@ -31,12 +31,12 @@ type ledgerFake struct { history []string failOn string // fill is what Fill answers; nil, the ledger says no fill. - fill *buscalls.LedgerFilled + fill *buscalls.Fill } -func (f *ledgerFake) Fill() (buscalls.LedgerFilled, error) { +func (f *ledgerFake) Fill() (buscalls.Fill, error) { if f.fill == nil { - return buscalls.LedgerFilled{}, errors.New("the runtime answers no mesh/ledger.fill") + return buscalls.Fill{}, errors.New("the runtime answers no mesh/ledger.fill") } return *f.fill, nil } @@ -809,8 +809,8 @@ func TestTheRecordsToolsReadThemAndEndOneByHand(t *testing.T) { // says room and hands the merge once the ledger is below 80 % again; the read tool says the fill. func TestTheRecordsLedgerSaysFillingFullAndRoom(t *testing.T) { const capBytes = 10 << 20 - filled := func(bytes uint64) *buscalls.LedgerFilled { - return &buscalls.LedgerFilled{History: buscalls.Fill{Count: 1, Bytes: bytes, MaxBytes: capBytes}, + filled := func(bytes uint64) *buscalls.Fill { + return &buscalls.Fill{History: buscalls.Fill{Count: 1, Bytes: bytes, MaxBytes: capBytes}, State: buscalls.Fill{Bytes: 1, MaxBytes: 64 << 20}} } heads := map[string]string{"novox/app@111111111111": strings.Repeat("1", 40)} diff --git a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/recordfill.go b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/recordfill.go index 33d856012..0154b4317 100644 --- a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/recordfill.go +++ b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/recordfill.go @@ -29,15 +29,15 @@ var ErrRecordsFull = errors.New("the delivery records' ledger is full") // fillReader is a ledger that says its fill against its cap. type fillReader interface { - Fill() (buscalls.LedgerFilled, error) + Fill() (buscalls.Fill, error) } -func (sdkLedger) Fill() (buscalls.LedgerFilled, error) { +func (sdkLedger) Fill() (buscalls.Fill, error) { out, err := ledgerCall(buscalls.LedgerFill, buscalls.LedgerRequest{Ledger: RecordsLedger}) if err != nil { - return buscalls.LedgerFilled{}, err + return buscalls.Fill{}, err } - var got buscalls.LedgerFilled + var got buscalls.Fill if err := json.Unmarshal(out, &got); err != nil { return got, fmt.Errorf("the ledger's fill is not readable: %w", err) }