G §462: the ledger's fill call mesh/ledger.fill, answered as one buscalls.Fill
Builds: design 47 G §462, §408 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user