MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / getLineageProvider

Method getLineageProvider

lineage.go:177–186  ·  view source on GitHub ↗

getLineageProvider extracts the fund provider from the transaction metadata. Parameters: - txn *model.Transaction: The transaction to extract the provider from. Returns: - string: The provider identifier, or empty string if not set.

(txn *model.Transaction)

Source from the content-addressed store, hash-verified

175// Returns:
176// - string: The provider identifier, or empty string if not set.
177func (l *LedgerForge) getLineageProvider(txn *model.Transaction) string {
178 if txn.MetaData == nil {
179 return ""
180 }
181 provider, ok := txn.MetaData[LineageProviderKey].(string)
182 if !ok {
183 return ""
184 }
185 return provider
186}
187
188// validateLineageProvider checks if the specified provider exists on the source balance.
189// If the source tracks fund lineage but doesn't have the specified provider,

Callers 3

processLineageMethod · 0.95
PrepareLineageOutboxMethod · 0.95
TestGetLineageProviderFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestGetLineageProviderFunction · 0.76