MCPcopy Create free account
hub / github.com/SeismicSystems/summit / rejects_wrong_signer

Function rejects_wrong_signer

rpc/src/auth.rs:132–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130 let err =
131 verify_action_with(&addr, now, &scope, ACTION_UNPAUSE, now, &pause_sig).unwrap_err();
132 assert!(matches!(err, RpcError::InvalidSignature));
133 }
134
135 /// A pause/unpause signature minted for deployment A must not authorize the
136 /// same action on deployment B, even though both trust the same admin key.
137 #[test]
138 fn rejects_other_deployment_scope() {
139 let admin = PrivateKeySigner::random();
140 let addr = admin.address();
141 let now = 1_700_000_000;
142
143 // Admin legitimately signs a pause for deployment A.

Callers

nothing calls this directly

Calls 2

signFunction · 0.85
verify_action_withFunction · 0.85

Tested by

no test coverage detected