add credit-debit rent handling (#6947)
* add credit-debit rent handling * add tests * charge rent for validator account for fee credit * rent is stored per tx instead of account
This commit is contained in:
@ -431,7 +431,7 @@ mod tests {
|
||||
"lamports": 51,
|
||||
"data": expected_data,
|
||||
"executable": false,
|
||||
"rent_epoch": 0,
|
||||
"rent_epoch": 1,
|
||||
},
|
||||
"subscription": 0,
|
||||
}
|
||||
@ -576,7 +576,7 @@ mod tests {
|
||||
"lamports": 100,
|
||||
"data": [],
|
||||
"executable": false,
|
||||
"rent_epoch": 0,
|
||||
"rent_epoch": 1,
|
||||
},
|
||||
"subscription": 0,
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ mod tests {
|
||||
subscriptions.check_account(&alice.pubkey(), 0, &bank_forks);
|
||||
let string = transport_receiver.poll();
|
||||
if let Async::Ready(Some(response)) = string.unwrap() {
|
||||
let expected = format!(r#"{{"jsonrpc":"2.0","method":"accountNotification","params":{{"result":{{"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"executable":false,"lamports":1,"owner":[2,203,81,223,225,24,34,35,203,214,138,130,144,208,35,77,63,16,87,51,47,198,115,123,98,188,19,160,0,0,0,0],"rent_epoch":0}},"subscription":0}}}}"#);
|
||||
let expected = format!(r#"{{"jsonrpc":"2.0","method":"accountNotification","params":{{"result":{{"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"executable":false,"lamports":1,"owner":[2,203,81,223,225,24,34,35,203,214,138,130,144,208,35,77,63,16,87,51,47,198,115,123,98,188,19,160,0,0,0,0],"rent_epoch":1}},"subscription":0}}}}"#);
|
||||
assert_eq!(expected, response);
|
||||
}
|
||||
|
||||
@ -401,7 +401,7 @@ mod tests {
|
||||
subscriptions.check_program(&solana_budget_api::id(), 0, &bank_forks);
|
||||
let string = transport_receiver.poll();
|
||||
if let Async::Ready(Some(response)) = string.unwrap() {
|
||||
let expected = format!(r#"{{"jsonrpc":"2.0","method":"programNotification","params":{{"result":["{:?}",{{"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"executable":false,"lamports":1,"owner":[2,203,81,223,225,24,34,35,203,214,138,130,144,208,35,77,63,16,87,51,47,198,115,123,98,188,19,160,0,0,0,0],"rent_epoch":0}}],"subscription":0}}}}"#, alice.pubkey());
|
||||
let expected = format!(r#"{{"jsonrpc":"2.0","method":"programNotification","params":{{"result":["{:?}",{{"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"executable":false,"lamports":1,"owner":[2,203,81,223,225,24,34,35,203,214,138,130,144,208,35,77,63,16,87,51,47,198,115,123,98,188,19,160,0,0,0,0],"rent_epoch":1}}],"subscription":0}}}}"#, alice.pubkey());
|
||||
assert_eq!(expected, response);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user