Skip to content

Commit

Permalink
Changed ManagerStakeholder to StakeholderManager.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zshan0 committed Apr 7, 2022
1 parent 6091013 commit 43071cf
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/commands/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ mod tests {
#[test]
fn test_listvaults_from_db() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
setup_db(&mut revaultd).unwrap();
let vaults = create_vaults(&revaultd);

Expand Down Expand Up @@ -976,7 +976,7 @@ mod tests {
#[test]
fn test_vaults_from_deposits() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
let db_file = revaultd.db_file();
setup_db(&mut revaultd).unwrap();
let vaults = create_vaults(&revaultd);
Expand Down Expand Up @@ -1388,7 +1388,7 @@ mod tests {
#[test]
fn test_gethistory() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
setup_db(&mut revaultd).unwrap();
let db_file = revaultd.db_file();

Expand Down
2 changes: 1 addition & 1 deletion src/communication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ mod tests {
#[test]
fn test_check_spend_transaction_size() {
let datadir = test_datadir();
let revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
// 3 inputs, 4 outputs, 3 stakeholders and 3 manager psbt. No problem.
let tx = SpendTransaction::from_psbt_str("cHNidP8BAP0ZAQIAAAADSe9QbkOAlLapVzhNT2J2sCWXMqe2x7g7klE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2KsJcwIpbzhFQEAAAAiAgOpos5KhVRQaTPJTi3mk12g5sApoQNVGdOpMcMmn7C7gwieIH0+AQAAAAA=").unwrap();
assert!(check_spend_transaction_size(&revaultd, tx));
Expand Down
14 changes: 7 additions & 7 deletions src/database/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ mod test {
#[test]
fn test_db_creation() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);

create_db(&mut revaultd).unwrap();
// There must be a wallet entry now, and there is only one so its id must
Expand Down Expand Up @@ -1130,7 +1130,7 @@ mod test {
#[test]
fn test_db_fetch_deposits() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
let db_path = revaultd.db_file();

setup_db(&mut revaultd).unwrap();
Expand Down Expand Up @@ -1236,7 +1236,7 @@ mod test {
#[test]
fn test_db_store_presigned_txs() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
let db_path = revaultd.db_file();
let secp_ctx = secp256k1::Secp256k1::new();

Expand Down Expand Up @@ -1536,7 +1536,7 @@ mod test {
#[test]
fn test_db_confirm_unvault() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
let db_path = revaultd.db_file();

setup_db(&mut revaultd).unwrap();
Expand Down Expand Up @@ -1611,7 +1611,7 @@ mod test {
#[test]
fn test_db_concurrent_write() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
let db_path = revaultd.db_file();
let secp_ctx = secp256k1::Secp256k1::new();

Expand Down Expand Up @@ -1689,7 +1689,7 @@ mod test {
#[test]
fn test_db_spend_storage() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
let db_path = revaultd.db_file();
let fresh_cancel_tx = CancelTransaction::from_psbt_str("cHNidP8BAF4CAAAAARoHs0elD2sCfWV4+b7PH3aRA+BkRVNf3m/P+Epjx2fNAAAAAAD9////AdLKAgAAAAAAIgAgB6abzQJ4vo5CO9XW3r3JnNumTwlpQbZm9FVICsLHPYQAAAAAAAEBK0ANAwAAAAAAIgAglEs6phQpv+twnAQSdjDvAEic65OtUIijeePBzAAqr50BAwSBAAAAAQWrIQO4lrAuffeRLuEEuwp2hAMZIPmqaHMTUySM3OwdA2hIW6xRh2R2qRTflccImFIy5NdTqwPuPZFB7g1pvYisa3apFOQxXoLeQv/aDFfav/l6YnYRKt+1iKxsk1KHZ1IhA32Q1DEqQ/kUP2MvQYFW46RCexZ5aYk17Arhp01th+37IQNrXQtfIXQdrv+RyyHLilJsb4ujlUMddG9X2jYkeXiWoFKvA3nxALJoIgYCEnb0lxeNI9466wDX+tqlq23zYNacTlLVLLLxtcVobG0INaO2mQoAAAAAAQFHUiED35umh5GhiToV6GS7lTokWfq/Rvy+rRI9XMQuf+foOoEhA9GtXpHhUvxcj9DJWbaRvz59CNsMwH2NEvmRa8gc2WRkUq4iAgISdvSXF40j3jrrANf62qWrbfNg1pxOUtUssvG1xWhsbQg1o7aZCgAAAAA=").unwrap();
let fresh_unvault_tx = UnvaultTransaction::from_psbt_str("cHNidP8BAIkCAAAAAfF2iPeJqz13zFlW6eLAM+uDu5IhUqcQxtMWQx7z5Y8lAAAAAAD9////AkANAwAAAAAAIgAgKb0SdnuqeHAJpRuZTbk3r81qbXpuHrMEmxT9Kph47HQwdQAAAAAAACIAIIMbpoIz4DI+aB1p/EJLyqjyDdDeZ7gG8kPhRIDiWaY8AAAAAAABASuIlAMAAAAAACIAIA9CgZ1cg/hn3iy3buDZvU5zUnQ9NzutToR/r42YZyu3AQMEAQAAAAEFR1IhA9P6hV8yf6HkNofzleom06eqkUxZayWHJnOMNlMtqvD3IQJo5Mj6Wf3ktrwEB3IQXFmgApibojplpNykg0hA8XV6SFKuIgYCEnb0lxeNI9466wDX+tqlq23zYNacTlLVLLLxtcVobG0INaO2mQoAAAAAAQGqIQMfu47eLiYeHN6Y3C1Vk0ckgmWifMy5IUhaPHbNELV93axRh2R2qRTtiGxBD5KrMQQU6UGx2zsKMMf6nIisa3apFCDKte9IuDeF0D4GA/JRUNX4xgt+iKxsk1KHZ1IhAzTPPnjrvzPFmi+raNR6sY8WTt1KNusVwp82uWebzWDwIQKl21mZX7WAQhRvdhhwqUAuQfIemg9zkTCCyMQ+Q8CVFVKvAqUBsmgiAgISdvSXF40j3jrrANf62qWrbfNg1pxOUtUssvG1xWhsbQg1o7aZCgAAAAABASUhAx+7jt4uJh4c3pjcLVWTRySCZaJ8zLkhSFo8ds0QtX3drFGHIgICEnb0lxeNI9466wDX+tqlq23zYNacTlLVLLLxtcVobG0INaO2mQoAAAAA").unwrap();
Expand Down Expand Up @@ -1957,7 +1957,7 @@ mod test {
#[test]
fn test_db_update_vault_status() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
let db_path = revaultd.db_file();

setup_db(&mut revaultd).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/database/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ mod test {
#[test]
fn test_db_vaults_with_txids_in_period() {
let datadir = test_datadir();
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::ManagerStakeholder);
let mut revaultd = dummy_revaultd(datadir.clone(), UserRole::StakeholderManager);
let db_path = revaultd.db_file();
setup_db(&mut revaultd).unwrap();
let genesis_timestamp: u32 = 1231006505;
Expand Down
2 changes: 1 addition & 1 deletion src/jsonrpc/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ mod tests {
#[test]
fn simple_write_recv() {
let datadir = test_datadir();
let rpcutils = dummy_rpcutil(datadir.clone(), UserRole::ManagerStakeholder);
let rpcutils = dummy_rpcutil(datadir.clone(), UserRole::StakeholderManager);
let revaultd_datadir = rpcutils.revaultd.read().unwrap().data_dir.clone();
let mut rpc_socket_path = revaultd_datadir.clone();
rpc_socket_path.push("revaultd_rpc");
Expand Down
2 changes: 1 addition & 1 deletion src/revaultd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ pub struct BlockchainTip {
pub enum UserRole {
Stakeholder,
Manager,
ManagerStakeholder,
StakeholderManager,
}

/// Our global state
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ addr = "127.0.0.1:8332"
match role {
UserRole::Stakeholder => config += stake_config,
UserRole::Manager => config += man_config,
UserRole::ManagerStakeholder => {
UserRole::StakeholderManager => {
config += stake_config;
config += man_config;
}
Expand Down

0 comments on commit 43071cf

Please sign in to comment.