Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Ref #213: Set unsatisfiable auths on eos
Browse files Browse the repository at this point in the history
Eos account now has unsatisfiable owner and active authorities, rather
than none at all.
  • Loading branch information
nathanielhourt committed Sep 18, 2017
1 parent 38c6554 commit fcfc82b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libraries/native_contract/native_contract_chain_initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ std::vector<chain::Message> native_contract_chain_initializer::prepare_database(
a.set_abi(eos_contract_abi());
}
});
const auto& owner = db.create<permission_object>([&name](permission_object& p) {
p.owner = name;
p.name = "owner";
p.auth.threshold = 1;
});
db.create<permission_object>([&name, &owner](permission_object& p) {
p.owner = name;
p.parent = owner.id;
p.name = "active";
p.auth.threshold = 1;
});
db.create<native::eos::BalanceObject>([&name, liquidBalance]( auto& b) {
b.ownerName = name;
b.balance = liquidBalance;
Expand Down

0 comments on commit fcfc82b

Please sign in to comment.