Just use rpc.getblockcount() directly
Add some comments