The events are consistent with the book. Laketown was previously known to Smaug as Esgaroth.
“I don’t know if it has occurred to you that, even if you could steal the gold bit by bit—a matter of a hundred years or so—you could not get it very far? Not much use on the mountain-side? Not much use in the forest? Bless me! Had you never thought of the catch? A fourteenth share, I suppose, or something like it, those were the terms, eh? But what about delivery? What about cartage? What about armed guards and tolls?” And Smaug laughed aloud. He had a wicked and a wily heart, and he knew his guesses were not far out, though he suspected that the Lake-men were at the back of the plans, and that most of the plunder was meant to stop there in the town by the shore that in his young days had been called Esgaroth.
This is confirmed to an extent in Chapter 10 (A Warm Welcome):
Not far from the mouth of the Forest River was the strange town he heard the elves speak of in the king’s cellars. It was not built on the shore, though there were a few huts and buildings there, but right out on the surface of the lake, protected from the swirl of the entering river by a promontory of rock which formed a calm bay. A great bridge made of wood ran out to where on huge piles made of forest trees was built a busy wooden town, not a town of elves but of Men, who still dared to dwell here under the shadow of the distant dragon-mountain. They still throve on the trade that came up the great river from the South and was carted past the falls to their town; but in the great days of old, when Dale in the North was rich and prosperous, they had been wealthy and powerful, and there had been fleets of boats on the waters, and some were filled with gold and some with warriors in armour, and there had been wars and deeds which were now only a legend. The rotting piles of a greater town could still be seen along the shores when the waters sank in a drought.
It is possible that Smaug did not know that the Wood-Elves were trading with Laketown. But he deduced from Bilbo's riddle that he arrived on water and concluded that the Lake-men must have aided him.
“I thought so last night,” he smiled to himself. “Lake-men, some nasty scheme of those miserable tub-trading Lake-men, or I’m a lizard. I haven’t been down that way for an age and an age; but I will soon alter that!”
“Very well, O Barrel-rider!” he said aloud. “Maybe Barrel was your pony’s name; and maybe not, though it was fat enough. You may walk unseen, but you did not walk all the way. Let me tell you I ate six ponies last night and I shall catch and eat all the others before long. In return for the excellent meal I will give you one piece of advice for your good: don’t have more to do with dwarves than you can help!”