@@ -19,7 +19,7 @@ use std::fmt::{self, Debug};
19
19
use crate :: {
20
20
blockchain:: Schema as CoreSchema ,
21
21
crypto:: { Hash , PublicKey , SecretKey } ,
22
- helpers:: { Height , ValidatorId } ,
22
+ helpers:: Height ,
23
23
messages:: Verified ,
24
24
node:: ApiSender ,
25
25
runtime:: {
@@ -191,16 +191,6 @@ impl<'a, 'b> TransactionContext<'a, 'b> {
191
191
& self . inner . caller
192
192
}
193
193
194
- /// Returns the validator ID if the transaction author is a validator.
195
- pub fn validator_id ( & self ) -> Option < ValidatorId > {
196
- // TODO Perhaps we should optimize this method [ECR-3222]
197
- self . caller ( ) . author ( ) . and_then ( |author| {
198
- CoreSchema :: new ( self . fork ( ) )
199
- . consensus_config ( )
200
- . find_validator ( |validator_keys| author == validator_keys. service_key )
201
- } )
202
- }
203
-
204
194
/// Enqueue dispatcher action.
205
195
pub fn dispatch_action ( & self , action : dispatcher:: Action ) {
206
196
self . inner
@@ -331,14 +321,6 @@ impl<'a> AfterCommitContext<'a> {
331
321
}
332
322
}
333
323
334
- /// Returns the validator ID if the current node is a validator.
335
- pub fn validator_id ( & self ) -> Option < ValidatorId > {
336
- // TODO Perhaps we should optimize this method [ECR-3222]
337
- CoreSchema :: new ( self . snapshot )
338
- . consensus_config ( )
339
- . find_validator ( |validator_keys| self . service_keypair . 0 == validator_keys. service_key )
340
- }
341
-
342
324
/// Returns a current blockchain height. This height is "height of the latest committed block".
343
325
pub fn height ( & self ) -> Height {
344
326
// TODO Perhaps we should optimize this method [ECR-3222]
0 commit comments