system: improve tree visualization formatting
This commit is contained in:
parent
d7eb94b123
commit
10ca07c7a5
|
@ -103,9 +103,9 @@ func (inst *AdvanceNonceAccount) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("NonceAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("$(SysVarRecentBlockHashesPubkey)", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta("NonceAuthorityAccount", inst.AccountMetaSlice[2]))
|
||||
accountsBranch.Child(ag_format.Meta(" Nonce", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("SysVarRecentBlockHashes", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta(" NonceAuthority", inst.AccountMetaSlice[2]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -94,7 +94,7 @@ func (inst *Allocate) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("NewAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("New", inst.AccountMetaSlice[0]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -138,16 +138,16 @@ func (inst *AllocateWithSeed) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Parameters of the instruction:
|
||||
instructionBranch.Child("Params").ParentFunc(func(paramsBranch ag_treeout.Branches) {
|
||||
paramsBranch.Child(ag_format.Param("Base", *inst.Base))
|
||||
paramsBranch.Child(ag_format.Param("Seed", *inst.Seed))
|
||||
paramsBranch.Child(ag_format.Param(" Base", *inst.Base))
|
||||
paramsBranch.Child(ag_format.Param(" Seed", *inst.Seed))
|
||||
paramsBranch.Child(ag_format.Param("Space", *inst.Space))
|
||||
paramsBranch.Child(ag_format.Param("Owner", *inst.Owner))
|
||||
})
|
||||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("AllocatedAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("BaseAccount", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta("Allocated", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta(" Base", inst.AccountMetaSlice[1]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -94,7 +94,7 @@ func (inst *Assign) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("AssignedAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("Assigned", inst.AccountMetaSlice[0]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -126,15 +126,15 @@ func (inst *AssignWithSeed) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Parameters of the instruction:
|
||||
instructionBranch.Child("Params").ParentFunc(func(paramsBranch ag_treeout.Branches) {
|
||||
paramsBranch.Child(ag_format.Param("Base", *inst.Base))
|
||||
paramsBranch.Child(ag_format.Param("Seed", *inst.Seed))
|
||||
paramsBranch.Child(ag_format.Param(" Base", *inst.Base))
|
||||
paramsBranch.Child(ag_format.Param(" Seed", *inst.Seed))
|
||||
paramsBranch.Child(ag_format.Param("Owner", *inst.Owner))
|
||||
})
|
||||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("AssignedAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("BaseAccount", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta("Assigned", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta(" Base", inst.AccountMetaSlice[1]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -107,8 +107,8 @@ func (inst *AuthorizeNonceAccount) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("NonceAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("NonceAuthorityAccount", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta(" Nonce", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("NonceAuthority", inst.AccountMetaSlice[1]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -127,14 +127,14 @@ func (inst *CreateAccount) EncodeToTree(parent ag_treeout.Branches) {
|
|||
// Parameters of the instruction:
|
||||
instructionBranch.Child("Params").ParentFunc(func(paramsBranch ag_treeout.Branches) {
|
||||
paramsBranch.Child(ag_format.Param("Lamports", *inst.Lamports))
|
||||
paramsBranch.Child(ag_format.Param("Space", *inst.Space))
|
||||
paramsBranch.Child(ag_format.Param("Owner", *inst.Owner))
|
||||
paramsBranch.Child(ag_format.Param(" Space", *inst.Space))
|
||||
paramsBranch.Child(ag_format.Param(" Owner", *inst.Owner))
|
||||
})
|
||||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("FundingAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("NewAccount", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta("Funding", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta(" New", inst.AccountMetaSlice[1]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -171,18 +171,18 @@ func (inst *CreateAccountWithSeed) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Parameters of the instruction:
|
||||
instructionBranch.Child("Params").ParentFunc(func(paramsBranch ag_treeout.Branches) {
|
||||
paramsBranch.Child(ag_format.Param("Base", *inst.Base))
|
||||
paramsBranch.Child(ag_format.Param("Seed", *inst.Seed))
|
||||
paramsBranch.Child(ag_format.Param(" Base", *inst.Base))
|
||||
paramsBranch.Child(ag_format.Param(" Seed", *inst.Seed))
|
||||
paramsBranch.Child(ag_format.Param("Lamports", *inst.Lamports))
|
||||
paramsBranch.Child(ag_format.Param("Space", *inst.Space))
|
||||
paramsBranch.Child(ag_format.Param("Owner", *inst.Owner))
|
||||
paramsBranch.Child(ag_format.Param(" Space", *inst.Space))
|
||||
paramsBranch.Child(ag_format.Param(" Owner", *inst.Owner))
|
||||
})
|
||||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("FundingAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("CreatedAccount", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta("BaseAccount", inst.AccountMetaSlice[2]))
|
||||
accountsBranch.Child(ag_format.Meta("Funding", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("Created", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta(" Base", inst.AccountMetaSlice[2]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -124,9 +124,9 @@ func (inst *InitializeNonceAccount) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("NonceAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("$(SysVarRecentBlockHashesPubkey)", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta("$(SysVarRentPubkey)", inst.AccountMetaSlice[2]))
|
||||
accountsBranch.Child(ag_format.Meta(" Nonce", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("SysVarRecentBlockHashes", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta(" SysVarRent", inst.AccountMetaSlice[2]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -107,8 +107,8 @@ func (inst *Transfer) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("FundingAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("RecipientAccount", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta(" Funding", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("Recipient", inst.AccountMetaSlice[1]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -139,16 +139,16 @@ func (inst *TransferWithSeed) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Parameters of the instruction:
|
||||
instructionBranch.Child("Params").ParentFunc(func(paramsBranch ag_treeout.Branches) {
|
||||
paramsBranch.Child(ag_format.Param("Lamports", *inst.Lamports))
|
||||
paramsBranch.Child(ag_format.Param("FromSeed", *inst.FromSeed))
|
||||
paramsBranch.Child(ag_format.Param(" Lamports", *inst.Lamports))
|
||||
paramsBranch.Child(ag_format.Param(" FromSeed", *inst.FromSeed))
|
||||
paramsBranch.Child(ag_format.Param("FromOwner", *inst.FromOwner))
|
||||
})
|
||||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("FundingAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("BaseForFundingAccount", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta("RecipientAccount", inst.AccountMetaSlice[2]))
|
||||
accountsBranch.Child(ag_format.Meta(" Funding", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("BaseForFunding", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta(" Recipient", inst.AccountMetaSlice[2]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -148,11 +148,11 @@ func (inst *WithdrawNonceAccount) EncodeToTree(parent ag_treeout.Branches) {
|
|||
|
||||
// Accounts of the instruction:
|
||||
instructionBranch.Child("Accounts").ParentFunc(func(accountsBranch ag_treeout.Branches) {
|
||||
accountsBranch.Child(ag_format.Meta("NonceAccount", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta("RecipientAccount", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta("$(SysVarRecentBlockHashesPubkey)", inst.AccountMetaSlice[2]))
|
||||
accountsBranch.Child(ag_format.Meta("$(SysVarRentPubkey)", inst.AccountMetaSlice[3]))
|
||||
accountsBranch.Child(ag_format.Meta("NonceAuthorityAccount", inst.AccountMetaSlice[4]))
|
||||
accountsBranch.Child(ag_format.Meta(" Nonce", inst.AccountMetaSlice[0]))
|
||||
accountsBranch.Child(ag_format.Meta(" Recipient", inst.AccountMetaSlice[1]))
|
||||
accountsBranch.Child(ag_format.Meta("SysVarRecentBlockHashes", inst.AccountMetaSlice[2]))
|
||||
accountsBranch.Child(ag_format.Meta(" SysVarRent", inst.AccountMetaSlice[3]))
|
||||
accountsBranch.Child(ag_format.Meta(" NonceAuthority", inst.AccountMetaSlice[4]))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue