diff --git a/go/buscalls/buscalls.go b/go/buscalls/buscalls.go index b39dada2..6db4fc6c 100644 --- a/go/buscalls/buscalls.go +++ b/go/buscalls/buscalls.go @@ -44,6 +44,8 @@ const ( LedgerHistory = "mesh/ledger.history" LedgerWatch = "mesh/ledger.watch" LedgerQuery = "mesh/ledger.query" + // LedgerFill is one ledger's fill against its cap, answered as a Fill (design 47 G §462). + LedgerFill = "mesh/ledger.fill" // The ledger's repairs, which the tool runner also serves as tools of every module owning a ledger, its own // ledgers only (design 25 § 12.5). LedgerRebuild = "mesh/ledger.rebuild" @@ -364,7 +366,7 @@ type ReindexRequest struct { Index string `json:"index"` } -// LedgerRequest names a ledger: lag. +// LedgerRequest names a ledger: lag, fill. type LedgerRequest struct { Ledger string `json:"ledger"` } diff --git a/go/packages_list_test.go b/go/packages_list_test.go index c2823dc7..c4246809 100644 --- a/go/packages_list_test.go +++ b/go/packages_list_test.go @@ -301,6 +301,13 @@ func TestMeshSDKHoldsOnlyWhatEveryModuleShares(t *testing.T) { if string(entry) != `{"instance":"listing/a17","sequence":3}` { t.Errorf("an index entry is %s", entry) } + // G §462: a ledger's fill is one call, answered as one buscalls.Fill. + if buscalls.LedgerFill != "mesh/ledger.fill" { + t.Errorf("a ledger's fill call is %q", buscalls.LedgerFill) + } + if raw, _ := json.Marshal(buscalls.Fill{Count: 3, Bytes: 10, MaxBytes: 100}); string(raw) != `{"count":3,"bytes":10,"max_bytes":100}` { + t.Errorf("a fill is %s", raw) + } // A tool's answer reads the same whatever wraps it (buscalls.Unwrap, the lead's ruling 2026-11-04 13:12). for _, c := range []struct { name, raw, answer, said string