Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 11d9952

Browse files
authored
Governance: Use correct max size for multiple instruction transaction (#2891)
* fix: use correct max size for multiple instruction transaction * chore: add instruction to serialisation tests
1 parent f36e973 commit 11d9952

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Anchor.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ cluster = "mainnet"
99
wallet = "~/.config/solana/id.json"
1010

1111
[programs.mainnet]
12-
spl_governance = "GoVEr6xcF9QGrRFJC4kt9wiCdNqZzrG7KWdrm7viDnpa"
12+
spl_governance = "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw"

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

governance/chat/program/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ serde = "1.0.127"
2121
serde_derive = "1.0.103"
2222
solana-program = "1.9.5"
2323
spl-token = { version = "3.3", path = "../../../token/program", features = [ "no-entrypoint" ] }
24-
spl-governance= { version = "2.2.2", path ="../../program", features = [ "no-entrypoint" ]}
24+
spl-governance= { version = "2.2.3", path ="../../program", features = [ "no-entrypoint" ]}
2525
spl-governance-tools= { version = "0.1.2", path ="../../tools"}
2626
spl-governance-addin-api= { version = "0.1.1", path ="../../addin-api"}
2727
thiserror = "1.0"

governance/program/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "spl-governance"
3-
version = "2.2.2"
3+
version = "2.2.3"
44
description = "Solana Program Library Governance Program"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"

governance/program/src/state/proposal_transaction.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,10 @@ impl AccountMaxSize for ProposalTransactionV2 {
125125
let instructions_size = self
126126
.instructions
127127
.iter()
128-
.map(|i| i.accounts.len() * 34 + i.data.len())
129-
.sum::<usize>()
130-
+ 4;
128+
.map(|i| i.accounts.len() * 34 + i.data.len() + 40)
129+
.sum::<usize>();
131130

132-
Some(instructions_size + 98)
131+
Some(instructions_size + 62)
133132
}
134133
}
135134

@@ -273,6 +272,7 @@ mod test {
273272
accounts: vec![
274273
create_test_account_meta_data(),
275274
create_test_account_meta_data(),
275+
create_test_account_meta_data(),
276276
],
277277
data: vec![1, 2, 3],
278278
}]

0 commit comments

Comments
 (0)