A bit more logging in automatic staking script
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 35s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 35s
Details
This commit is contained in:
parent
7b67526515
commit
5455fb4c15
|
@ -120,15 +120,17 @@ const stakeEach = async (pools, amountPerPool) => {
|
|||
await Promise.all(promises);
|
||||
};
|
||||
|
||||
async function main() {
|
||||
await initialize();
|
||||
|
||||
validationPools.forEach((pool) => {
|
||||
console.log(`pool ${pool.id.toString()}, `
|
||||
const printPool = (pool) => {
|
||||
console.log(`pool ${pool.id.toString()}, `
|
||||
+ `status: ${getPoolStatus(pool)}, `
|
||||
+ `is valid: ${poolIsValid(pool)}, `
|
||||
+ `post content: ${pool.post?.content}`);
|
||||
});
|
||||
};
|
||||
|
||||
async function main() {
|
||||
await initialize();
|
||||
|
||||
validationPools.forEach(printPool);
|
||||
|
||||
// Stake half of available reputation on any active pools
|
||||
const activePools = validationPools.filter(poolIsActive);
|
||||
|
@ -139,8 +141,8 @@ async function main() {
|
|||
|
||||
// Listen for new validation pools
|
||||
dao.on('ValidationPoolInitiated', async (poolIndex) => {
|
||||
console.log(`pool ${poolIndex} started`);
|
||||
const pool = await fetchValidationPool(poolIndex);
|
||||
printPool(pool);
|
||||
await fetchReputation();
|
||||
if (!reputation) return;
|
||||
const amountToStake = reputation / BigInt(2);
|
||||
|
|
Loading…
Reference in New Issue