How soon does bitcoind incorporate locally solved blocks into its 'getwork' output? If one sends a solved block to bitcoind server using getmemorypool or getwork, and right after that requests a new block using the same API call, what will the server respond with? Assuming the data is correct, will bitcoind immediately create a new block to be solved with prev block field corresponding to the hash of the recently submitted work, or will it wait for the block to be accepted by its peers first?
Bitcoin won't wait for its peers: your block will be considered the latest block in the chain once it has been processed. I'm not sure whether it's safe to say that the second RPC call will always reflect the existence of the new block, though, since Bitcoin is threaded and things might not be done in the exact order you expect.