Skip to content

Commit 63517b5

Browse files
author
µ
committed
simple testcase
1 parent 65f12eb commit 63517b5

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

test_old_new.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import sys
2+
import bittensor as bt
3+
st = bt.subtensor(network='local')
4+
print("ss58 format:",st.substrate.ss58_format)
5+
print("current block:",st.block)
6+
7+
coldkey = '5HHHHHzgLnYRvnKkHd45cRUDMHXTSwx7MjUzxBrKbY4JfZWn'
8+
9+
# dtao epoch is 4920350
10+
11+
b_pre = 4920340
12+
b_post = 4920360
13+
14+
n=3
15+
if len(sys.argv)>1:
16+
n = int(sys.argv[1])
17+
18+
for i in range(n):
19+
s0 = st.get_stake_for_coldkey(coldkey,block=b_post+i)
20+
print(f'at block {b_post+i}: {s0}')
21+
for i in range(n):
22+
s1 = st.query_subtensor("TotalColdkeyStake",b_pre+i,[coldkey]).value
23+
print(f'at block {b_pre+i}: {s1}')
24+
for i in range(n):
25+
s2 = st.get_stake_for_coldkey(coldkey,block=b_post+i)
26+
print(f'at block {b_post+i}: {s2}')
27+
28+

0 commit comments

Comments
 (0)