Skip to content

Commit

Permalink
Add ChallengesApi, RewardManager to SDK (#7026)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyrombo authored Jan 24, 2024
1 parent 3f55d5d commit 439f10b
Show file tree
Hide file tree
Showing 95 changed files with 4,642 additions and 1,493 deletions.
2 changes: 1 addition & 1 deletion dev-tools/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
db:
image: postgres:11.4
shm_size: 2g
command: postgres -c shared_buffers=2GB
command: postgres -c shared_buffers=2GB -c max_connections=300
restart: unless-stopped
ports:
- 5432:5432
Expand Down
15 changes: 15 additions & 0 deletions dev-tools/compose/nginx_ingress.conf
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,21 @@ server {
server_name audius-protocol-solana-test-validator-1;

location / {
try_files /nonexistent @$http_upgrade;
}

location @websocket {
resolver 127.0.0.11 valid=30s;
set $upstream audius-protocol-solana-test-validator-1:8900;
proxy_http_version 1.1;
proxy_pass http://$upstream;
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

location @ {
resolver 127.0.0.11 valid=30s;
set $upstream audius-protocol-solana-test-validator-1:8899;
proxy_pass http://$upstream;
Expand Down
56 changes: 56 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,17 @@ def test_get_attestation_weekly_pool_exhausted(app):


@pytest.fixture
def patch_get_all_other_nodes():
def patch_get_all_nodes():
with patch(
"src.queries.get_attestation.get_all_other_discovery_nodes_wallets_cached",
return_value=["0x94e140D27F3d5EE9EcA0109A71CcBa0109964DCa"],
"src.queries.get_attestation.get_all_discovery_nodes_cached",
return_value=[
{"delegateOwnerWallet": "0x94e140D27F3d5EE9EcA0109A71CcBa0109964DCa"}
],
):
yield


def test_get_create_sender_attestation(app, patch_get_all_other_nodes):
def test_get_create_sender_attestation(app, patch_get_all_nodes):
new_sender_address = "0x94e140D27F3d5EE9EcA0109A71CcBa0109964DCa"
owner_wallet, sender_attestation = get_create_sender_attestation(new_sender_address)

Expand Down Expand Up @@ -315,7 +317,7 @@ def test_get_create_sender_attestation(app, patch_get_all_other_nodes):
)


def test_get_create_sender_attestation_not_registered(app, patch_get_all_other_nodes):
def test_get_create_sender_attestation_not_registered(app, patch_get_all_nodes):
new_sender_address = "0x04e140D27F3d5EE9EcA0109A71CcBa0109964DCa"
with pytest.raises(
Exception,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ def get_events_side_effect(_, tx_receipt):
)

mocker.patch(
"src.queries.confirm_indexing_transaction_error.get_all_other_discovery_nodes_cached",
return_value=["node1", "node2", "node3"],
"src.queries.confirm_indexing_transaction_error.get_all_discovery_nodes_cached",
return_value=[
{"endpoint": "node1", "delegateOwnerWallet": "wallet1"},
{"endpoint": "node2", "delegateOwnerWallet": "wallet2"},
{"endpoint": "node3", "delegateOwnerWallet": "wallet3"},
],
autospec=True,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const main = async () => {
console.log(`using ${initialSelectedNode}`);

const discoveryNodeSelector = new DiscoveryNodeSelector({
initialSelectedNode,
initialSelectedNode: initialSelectedNode.endpoint,
});

const entityManager = new EntityManager({
Expand Down
Loading

0 comments on commit 439f10b

Please sign in to comment.