I am confused about how getdata() is actually implemented at full nodes.
Suppose a full node receives a getdata() request with MSG_BLOCK flag and a hash H of some block B. Then would it simply look up H into its levelDB database to fetch B from its disk and return it to the caller (in constt time) or something more expensive is done?
Can I also get some references to read about it?