evidence.go
TEXT FILE414 B · Public source code for developers, search crawlers and AI agents
1package architecture
2
3import "fmt"
4
5type Observation struct {
6 Known bool
7 InMempool bool
8 Confirmations int
9}
10
11func Describe(o Observation) string {
12 if !o.Known || o.Confirmations < 0 { return "Unknown outcome" }
13 if o.Confirmations > 0 { return fmt.Sprintf("Observed confirmations: %d", o.Confirmations) }
14 if o.InMempool { return "Seen in mempool; not confirmed" }
15 return "No current confirmation evidence"
16}Read-only source · Select a line number to link directly · Raw download above
