File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1343,10 +1343,19 @@ pub fn validate_stake_transaction<'a>(
13431343 }
13441344
13451345 // A stake transaction can only stake on an existing validator if the withdrawer address is the same
1346- stakes. check_validator_withdrawer (
1346+ match stakes. check_validator_withdrawer (
13471347 st_tx. body . output . key . validator ,
13481348 st_tx. body . output . key . withdrawer ,
1349- ) ?;
1349+ ) {
1350+ Ok ( _) => ( ) ,
1351+ Err ( _) => {
1352+ return Err ( TransactionError :: NoStakeFound {
1353+ validator : st_tx. body . output . key . validator ,
1354+ withdrawer : st_tx. body . output . key . withdrawer ,
1355+ }
1356+ . into ( ) ) ;
1357+ }
1358+ }
13501359
13511360 // Check that the amount of coins to stake plus the alread staked amount is equal or smaller than the maximum allowed
13521361 let stakes_key = QueryStakesKey :: Key ( StakeKey {
You can’t perform that action at this time.
0 commit comments