CRYPTO NEWS

type(C).name seems really redundant? A few questions related to this

So if I have

contract SimpleStorage { 

}

contract ComplexStorage {     string nam1 = type(SimpleStorage).name;     string nam2 = type(ComplexStorage).name; } 

Returning the name of itself seems a little redundant. I know for type(C).codeCreation one cannot call this within C.

I feel like my understanding of the use of this is missing. Why would there be a function that basically returns what you pass it? Why would there be a function that can be called within itself that is asking for it’s own name?

What am I missing something or not seeing in the utility of this function?

How to ignore ResourceWarnings during running tests?

I was trying to run python tests in order to test a PR. I used this command to run p2p tests: [[email protected] bitcoin]$ ./test/functional/test_runner.py test/functional/p2p* It produces lots of ResourceWarning warnings. And the result of the tests is this: TEST | STATUS | DURATION p2p_add_connections.py | ✖ Failed | 7 s p2p_addr_relay.py | ✖ Failed::Listen

I was trying to run python tests in order to test a PR. I used this command to run p2p tests:

[[email protected] bitcoin]$ ./test/functional/test_runner.py test/functional/p2p* 

It produces lots of ResourceWarning warnings. And the result of the tests is this:

TEST                            | STATUS    | DURATION  p2p_add_connections.py          | ✖ Failed  | 7 s p2p_addr_relay.py               | ✖ Failed  | 18 s p2p_addrfetch.py                | ✖ Failed  | 2 s p2p_addrv2_relay.py             | ✖ Failed  | 1 s p2p_block_sync.py               | ✖ Failed  | 1 s p2p_blockfilters.py             | ✖ Failed  | 17 s p2p_blocksonly.py               | ✖ Failed  | 10 s p2p_compactblocks.py            | ✖ Failed  | 6 s p2p_compactblocks_blocksonly.py | ✖ Failed  | 2 s p2p_compactblocks_hb.py         | ✖ Failed  | 9 s p2p_disconnect_ban.py           | ✖ Failed  | 2 s p2p_dns_seeds.py                | ✖ Failed  | 36 s p2p_dos_header_tree.py          | ✖ Failed  | 2 s p2p_eviction.py                 | ✖ Failed  | 5 s p2p_feefilter.py                | ✖ Failed  | 7 s p2p_filter.py                   | ✖ Failed  | 4 s p2p_fingerprint.py              | ✖ Failed  | 1 s p2p_getaddr_caching.py          | ✖ Failed  | 21 s p2p_getdata.py                  | ✖ Failed  | 1 s p2p_i2p_ports.py                | ✖ Failed  | 3 s p2p_ibd_txrelay.py              | ✖ Failed  | 2 s p2p_invalid_block.py            | ✖ Failed  | 2 s p2p_invalid_locator.py          | ✖ Failed  | 2 s p2p_invalid_messages.py         | ✖ Failed  | 50 s p2p_invalid_tx.py               | ✖ Failed  | 8 s p2p_leak.py                     | ✖ Failed  | 7 s p2p_leak_tx.py                  | ✖ Failed  | 2 s p2p_message_capture.py          | ✖ Failed  | 2 s p2p_nobloomfilter_messages.py   | ✖ Failed  | 3 s p2p_node_network_limited.py     | ✖ Failed  | 11 s p2p_permissions.py              | ✖ Failed  | 11 s p2p_ping.py                     | ✖ Failed  | 2 s p2p_segwit.py                   | ✖ Failed  | 131 s p2p_sendheaders.py              | ✖ Failed  | 16 s p2p_timeouts.py                 | ✖ Failed  | 2 s p2p_tx_download.py              | ✖ Failed  | 38 s p2p_unrequested_blocks.py       | ✖ Failed  | 5 s  ALL                             | ✖ Failed  | 449 s (accumulated)  Runtime: 188 s 

So I think the tests are failed due to my computer limited resources. Is this correct? If yes, is there any way to suppress these kind of failures and don’t count them as failing test?

Crypto Hats, Crypto Shirts, Crypto Socks, Crypto Clothing

type(C).name seems really redundant? A few questions related to this

Shopping cart
There are no products in the cart!
Continue shopping
0